Struct yubico::configure::ConfigFlags [−]
pub struct ConfigFlags { /* fields omitted */ }
Methods
impl ConfigFlags
impl ConfigFlags
pub const SEND_REF: ConfigFlags
SEND_REF: ConfigFlags = ConfigFlags{bits: 1,}
pub const TICKET_FIRST: ConfigFlags
TICKET_FIRST: ConfigFlags = ConfigFlags{bits: 2,}
pub const PACING_10MS: ConfigFlags
PACING_10MS: ConfigFlags = ConfigFlags{bits: 4,}
pub const PACING_20MS: ConfigFlags
PACING_20MS: ConfigFlags = ConfigFlags{bits: 8,}
pub const STATIC_TICKET: ConfigFlags
STATIC_TICKET: ConfigFlags = ConfigFlags{bits: 32,}
pub const SHORT_TICKET: ConfigFlags
SHORT_TICKET: ConfigFlags = ConfigFlags{bits: 2,}
pub const STRONG_PW1: ConfigFlags
STRONG_PW1: ConfigFlags = ConfigFlags{bits: 16,}
pub const STRONG_PW2: ConfigFlags
STRONG_PW2: ConfigFlags = ConfigFlags{bits: 64,}
pub const MAN_UPDATE: ConfigFlags
MAN_UPDATE: ConfigFlags = ConfigFlags{bits: 128,}
pub const OATH_HOTP8: ConfigFlags
OATH_HOTP8: ConfigFlags = ConfigFlags{bits: 2,}
pub const OATH_FIXED_MODHEX1: ConfigFlags
OATH_FIXED_MODHEX1: ConfigFlags = ConfigFlags{bits: 16,}
pub const OATH_FIXED_MODHEX2: ConfigFlags
OATH_FIXED_MODHEX2: ConfigFlags = ConfigFlags{bits: 64,}
pub const OATH_FIXED_MODHEX: ConfigFlags
OATH_FIXED_MODHEX: ConfigFlags = ConfigFlags{bits: 80,}
pub const OATH_FIXED_MASK: ConfigFlags
OATH_FIXED_MASK: ConfigFlags = ConfigFlags{bits: 80,}
pub const CHAL_YUBICO: ConfigFlags
CHAL_YUBICO: ConfigFlags = ConfigFlags{bits: 32,}
pub const CHAL_HMAC: ConfigFlags
CHAL_HMAC: ConfigFlags = ConfigFlags{bits: 34,}
pub const HMAC_LT64: ConfigFlags
HMAC_LT64: ConfigFlags = ConfigFlags{bits: 4,}
pub const CHAL_BTN_TRIG: ConfigFlags
CHAL_BTN_TRIG: ConfigFlags = ConfigFlags{bits: 8,}
pub fn empty() -> ConfigFlags
pub fn empty() -> ConfigFlags
Returns an empty set of flags.
pub fn all() -> ConfigFlags
pub fn all() -> ConfigFlags
Returns the set containing all flags.
pub fn bits(&self) -> u8
pub fn bits(&self) -> u8
Returns the raw value of the flags currently stored.
pub fn from_bits(bits: u8) -> Option<ConfigFlags>
pub fn from_bits(bits: u8) -> Option<ConfigFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> ConfigFlags
pub fn from_bits_truncate(bits: u8) -> ConfigFlags
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub fn is_empty(&self) -> bool
pub fn is_empty(&self) -> bool
Returns true
if no flags are currently stored.
pub fn is_all(&self) -> bool
pub fn is_all(&self) -> bool
Returns true
if all flags are currently set.
pub fn intersects(&self, other: ConfigFlags) -> bool
pub fn intersects(&self, other: ConfigFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: ConfigFlags) -> bool
pub fn contains(&self, other: ConfigFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: ConfigFlags)
pub fn insert(&mut self, other: ConfigFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: ConfigFlags)
pub fn remove(&mut self, other: ConfigFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: ConfigFlags)
pub fn toggle(&mut self, other: ConfigFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: ConfigFlags, value: bool)
pub fn set(&mut self, other: ConfigFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for ConfigFlags
impl Copy for ConfigFlags
impl PartialEq for ConfigFlags
impl PartialEq for ConfigFlags
fn eq(&self, other: &ConfigFlags) -> bool
fn eq(&self, other: &ConfigFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ConfigFlags) -> bool
fn ne(&self, other: &ConfigFlags) -> bool
This method tests for !=
.
impl Eq for ConfigFlags
impl Eq for ConfigFlags
impl Clone for ConfigFlags
impl Clone for ConfigFlags
fn clone(&self) -> ConfigFlags
fn clone(&self) -> ConfigFlags
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl PartialOrd for ConfigFlags
impl PartialOrd for ConfigFlags
fn partial_cmp(&self, other: &ConfigFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &ConfigFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &ConfigFlags) -> bool
fn lt(&self, other: &ConfigFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &ConfigFlags) -> bool
fn le(&self, other: &ConfigFlags) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
fn gt(&self, other: &ConfigFlags) -> bool
fn gt(&self, other: &ConfigFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &ConfigFlags) -> bool
fn ge(&self, other: &ConfigFlags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for ConfigFlags
impl Ord for ConfigFlags
fn cmp(&self, other: &ConfigFlags) -> Ordering
fn cmp(&self, other: &ConfigFlags) -> Ordering
This method returns an Ordering
between self
and other
. Read more
fn max(self, other: Self) -> Self
1.21.0[src]
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
fn min(self, other: Self) -> Self
1.21.0[src]
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
impl Hash for ConfigFlags
impl Hash for ConfigFlags
fn hash<__H: Hasher>(&self, state: &mut __H)
fn hash<__H: Hasher>(&self, state: &mut __H)
Feeds this value into the given [Hasher
]. Read more
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
Feeds a slice of this type into the given [Hasher
]. Read more
impl Debug for ConfigFlags
impl Debug for ConfigFlags
impl Binary for ConfigFlags
impl Binary for ConfigFlags
impl Octal for ConfigFlags
impl Octal for ConfigFlags
impl LowerHex for ConfigFlags
impl LowerHex for ConfigFlags
impl UpperHex for ConfigFlags
impl UpperHex for ConfigFlags
impl BitOr for ConfigFlags
impl BitOr for ConfigFlags
type Output = ConfigFlags
The resulting type after applying the |
operator.
fn bitor(self, other: ConfigFlags) -> ConfigFlags
fn bitor(self, other: ConfigFlags) -> ConfigFlags
Returns the union of the two sets of flags.
impl BitOrAssign for ConfigFlags
impl BitOrAssign for ConfigFlags
fn bitor_assign(&mut self, other: ConfigFlags)
fn bitor_assign(&mut self, other: ConfigFlags)
Adds the set of flags.
impl BitXor for ConfigFlags
impl BitXor for ConfigFlags
type Output = ConfigFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: ConfigFlags) -> ConfigFlags
fn bitxor(self, other: ConfigFlags) -> ConfigFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for ConfigFlags
impl BitXorAssign for ConfigFlags
fn bitxor_assign(&mut self, other: ConfigFlags)
fn bitxor_assign(&mut self, other: ConfigFlags)
Toggles the set of flags.
impl BitAnd for ConfigFlags
impl BitAnd for ConfigFlags
type Output = ConfigFlags
The resulting type after applying the &
operator.
fn bitand(self, other: ConfigFlags) -> ConfigFlags
fn bitand(self, other: ConfigFlags) -> ConfigFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for ConfigFlags
impl BitAndAssign for ConfigFlags
fn bitand_assign(&mut self, other: ConfigFlags)
fn bitand_assign(&mut self, other: ConfigFlags)
Disables all flags disabled in the set.
impl Sub for ConfigFlags
impl Sub for ConfigFlags
type Output = ConfigFlags
The resulting type after applying the -
operator.
fn sub(self, other: ConfigFlags) -> ConfigFlags
fn sub(self, other: ConfigFlags) -> ConfigFlags
Returns the set difference of the two sets of flags.
impl SubAssign for ConfigFlags
impl SubAssign for ConfigFlags
fn sub_assign(&mut self, other: ConfigFlags)
fn sub_assign(&mut self, other: ConfigFlags)
Disables all flags enabled in the set.
impl Not for ConfigFlags
impl Not for ConfigFlags
type Output = ConfigFlags
The resulting type after applying the !
operator.
fn not(self) -> ConfigFlags
fn not(self) -> ConfigFlags
Returns the complement of this set of flags.
impl Extend<ConfigFlags> for ConfigFlags
impl Extend<ConfigFlags> for ConfigFlags
fn extend<T: IntoIterator<Item = ConfigFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = ConfigFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<ConfigFlags> for ConfigFlags
impl FromIterator<ConfigFlags> for ConfigFlags
fn from_iter<T: IntoIterator<Item = ConfigFlags>>(iterator: T) -> ConfigFlags
fn from_iter<T: IntoIterator<Item = ConfigFlags>>(iterator: T) -> ConfigFlags
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for ConfigFlags
impl Send for ConfigFlags
impl Sync for ConfigFlags
impl Sync for ConfigFlags