Pre-RFC: binary patterns

Please let’s not confuse the discussion of binary patterns – the subject of this thread – with the subject of bitfields, which is a concurrent discussion thread.

The proposed syntax makes it possible to pattern-match against non-contiguous fields, ignoring or saving intermediary bits, which seems to be a minimum requirement.

I personally would like to see the proposal unified with the more general topic of bitfields, so that the pattern-matching could be against defined bitfields without necessitating dropping to the representation level of the current pre-RFC. It should also be unified, to the extent possible, with the apparently-dominant bitfields crate from the Rust Embedded Development effort.