pub fn bit(self, required: bool) -> Option<u16> {
        if self == Feature::InitialRoutingSync && required {
            return None;
        }
        Some(self as u16 + !required as u16)
    }
/// Returns number of bit that is set by the flag
///
/// # Arguments
/// `required`: which type of flag bit should be returned:
/// - `false` for even (non-required) bit variant
/// - `true` for odd (required) bit variant
///
/// # Returns
/// Bit number in feature verctor if the feature is allowed for the provided
/// `required` condition; `None` otherwise.
Returns number of bit that is set by the flag
Returns number of bit that is set by the flag
pub fn bit(self, required: bool) -> Option<u16> {
        if self == Feature::InitialRoutingSync && required {
            return None;
        }
        Some(self as u16 + !required as u16)
    }
pub fn bit ( self , required : bool ) -> Option < u16 > { if self == Feature :: InitialRoutingSync && required { return None ; } Some ( self as u16 + ! required as u16 ) }
Returns number of bit that is set by the flag
Returns number of bit that is set by the flag
self
required
bool
Bit number in feature verctor if the feature is allowed for the provided
`required` condition; `None` otherwise.
Bit number in feature verctor if the feature is allowed for the provided ` required ` condition ; ` None ` otherwise .
self
required
bool
false
for even (non-required) bit variant
for even ( non - required ) bit variant
true
for odd (required) bit variant
for odd ( required ) bit variant