Skip to main content

check_flags

Function check_flags 

Source
pub fn check_flags(byte: u8, mask: u8) -> bool
Expand description

Return true if ALL bits in mask are set in byte.

const ACTIVE_AND_VERIFIED: u8 = 0b0000_0011;
if check_flags(state_flags, ACTIVE_AND_VERIFIED) { ... }