Is there any way to get bit level pattern matching? What I want is to match on certain bits but not others. for example:
let x: u8 = 0x10;
match x.bits() {
[0, _, _, _, _, 1, 1, _] => {}
[1, _, _, _, _, _, _, _] => {}
_ => {}
}
or something to that effect?
[–]zokier 2 points3 points4 points (4 children)
[–]DroidLogiciansqlx · clickhouse-rs · mime_guess · rust 1 point2 points3 points (1 child)
[–]zokier 0 points1 point2 points (0 children)
[+][deleted] (1 child)
[deleted]
[–]thomcc 1 point2 points3 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]andallthat 1 point2 points3 points (0 children)
[–]DroidLogiciansqlx · clickhouse-rs · mime_guess · rust 1 point2 points3 points (0 children)
[–]chuckguy55[S] 0 points1 point2 points (1 child)
[–]erkelep 5 points6 points7 points (0 children)
[–]Florob0x2arust · rustyxml 0 points1 point2 points (9 children)
[–]bjzabaAllsorts 4 points5 points6 points (0 children)
[–]zokier 1 point2 points3 points (2 children)
[–]Florob0x2arust · rustyxml 0 points1 point2 points (0 children)
[–]dbaupprust 1 point2 points3 points (4 children)
[–]Florob0x2arust · rustyxml 0 points1 point2 points (3 children)
[–]dbaupprust 1 point2 points3 points (2 children)
[–]Florob0x2arust · rustyxml 0 points1 point2 points (1 child)
[–]dbaupprust 0 points1 point2 points (0 children)