pub fn from_bits(bits: T::Numeric) -> Result<Self, FromBitsError<T>> {
        let flags = Self::from_bits_truncate(bits);
        if flags.bits() == bits {
            Ok(flags)
        } else {
            Err(FromBitsError {
                flags,
                invalid: bits & !flags.bits(),
            })
        }
    }
/// Returns a `BitFlags<T>` if the raw value provided does not contain
/// any illegal flags.
Returns a `BitFlags` if the raw value provided does not contain
any illegal flags.
Returns a ` BitFlags ` if the raw value provided does not contain any illegal flags .
pub fn from_bits(bits: T::Numeric) -> Result<Self, FromBitsError<T>> {
        let flags = Self::from_bits_truncate(bits);
        if flags.bits() == bits {
            Ok(flags)
        } else {
            Err(FromBitsError {
                flags,
                invalid: bits & !flags.bits(),
            })
        }
    }
pub fn from_bits ( bits : T :: Numeric ) -> Result < Self , FromBitsError < T > > { let flags = Self :: from_bits_truncate ( bits ) ; if flags . bits ( ) == bits { Ok ( flags ) } else { Err ( FromBitsError { flags , invalid : bits & ! flags . bits ( ) , } ) } }
Returns a `BitFlags<T>` if the raw value provided does not contain
any illegal flags.
Returns a ` BitFlags<T > ` if the raw value provided does not contain any illegal flags .
bits
T::Numeric
bits
T::Numeric