Struct yubico::configure::TicketFlags [−]
pub struct TicketFlags { /* fields omitted */ }
Methods
impl TicketFlags
impl TicketFlags
pub const TAB_FIRST: TicketFlags
TAB_FIRST: TicketFlags = TicketFlags{bits: 1,}
pub const APPEND_TAB1: TicketFlags
APPEND_TAB1: TicketFlags = TicketFlags{bits: 2,}
pub const APPEND_TAB2: TicketFlags
APPEND_TAB2: TicketFlags = TicketFlags{bits: 4,}
pub const APPEND_DELAY1: TicketFlags
APPEND_DELAY1: TicketFlags = TicketFlags{bits: 8,}
pub const APPEND_DELAY2: TicketFlags
APPEND_DELAY2: TicketFlags = TicketFlags{bits: 16,}
pub const APPEND_CR: TicketFlags
APPEND_CR: TicketFlags = TicketFlags{bits: 32,}
pub const OATH_HOTP: TicketFlags
OATH_HOTP: TicketFlags = TicketFlags{bits: 64,}
pub const CHAL_RESP: TicketFlags
CHAL_RESP: TicketFlags = TicketFlags{bits: 64,}
pub const PROTECT_CFG2: TicketFlags
PROTECT_CFG2: TicketFlags = TicketFlags{bits: 128,}
pub fn empty() -> TicketFlags
pub fn empty() -> TicketFlags
Returns an empty set of flags.
pub fn all() -> TicketFlags
pub fn all() -> TicketFlags
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<TicketFlags>
pub fn from_bits(bits: u8) -> Option<TicketFlags>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub fn from_bits_truncate(bits: u8) -> TicketFlags
pub fn from_bits_truncate(bits: u8) -> TicketFlags
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: TicketFlags) -> bool
pub fn intersects(&self, other: TicketFlags) -> bool
Returns true
if there are flags common to both self
and other
.
pub fn contains(&self, other: TicketFlags) -> bool
pub fn contains(&self, other: TicketFlags) -> bool
Returns true
all of the flags in other
are contained within self
.
pub fn insert(&mut self, other: TicketFlags)
pub fn insert(&mut self, other: TicketFlags)
Inserts the specified flags in-place.
pub fn remove(&mut self, other: TicketFlags)
pub fn remove(&mut self, other: TicketFlags)
Removes the specified flags in-place.
pub fn toggle(&mut self, other: TicketFlags)
pub fn toggle(&mut self, other: TicketFlags)
Toggles the specified flags in-place.
pub fn set(&mut self, other: TicketFlags, value: bool)
pub fn set(&mut self, other: TicketFlags, value: bool)
Inserts or removes the specified flags depending on the passed value.
Trait Implementations
impl Copy for TicketFlags
impl Copy for TicketFlags
impl PartialEq for TicketFlags
impl PartialEq for TicketFlags
fn eq(&self, other: &TicketFlags) -> bool
fn eq(&self, other: &TicketFlags) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &TicketFlags) -> bool
fn ne(&self, other: &TicketFlags) -> bool
This method tests for !=
.
impl Eq for TicketFlags
impl Eq for TicketFlags
impl Clone for TicketFlags
impl Clone for TicketFlags
fn clone(&self) -> TicketFlags
fn clone(&self) -> TicketFlags
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 TicketFlags
impl PartialOrd for TicketFlags
fn partial_cmp(&self, other: &TicketFlags) -> Option<Ordering>
fn partial_cmp(&self, other: &TicketFlags) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
fn lt(&self, other: &TicketFlags) -> bool
fn lt(&self, other: &TicketFlags) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
fn le(&self, other: &TicketFlags) -> bool
fn le(&self, other: &TicketFlags) -> 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: &TicketFlags) -> bool
fn gt(&self, other: &TicketFlags) -> bool
This method tests greater than (for self
and other
) and is used by the >
operator. Read more
fn ge(&self, other: &TicketFlags) -> bool
fn ge(&self, other: &TicketFlags) -> bool
This method tests greater than or equal to (for self
and other
) and is used by the >=
operator. Read more
impl Ord for TicketFlags
impl Ord for TicketFlags
fn cmp(&self, other: &TicketFlags) -> Ordering
fn cmp(&self, other: &TicketFlags) -> 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 TicketFlags
impl Hash for TicketFlags
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 TicketFlags
impl Debug for TicketFlags
impl Binary for TicketFlags
impl Binary for TicketFlags
impl Octal for TicketFlags
impl Octal for TicketFlags
impl LowerHex for TicketFlags
impl LowerHex for TicketFlags
impl UpperHex for TicketFlags
impl UpperHex for TicketFlags
impl BitOr for TicketFlags
impl BitOr for TicketFlags
type Output = TicketFlags
The resulting type after applying the |
operator.
fn bitor(self, other: TicketFlags) -> TicketFlags
fn bitor(self, other: TicketFlags) -> TicketFlags
Returns the union of the two sets of flags.
impl BitOrAssign for TicketFlags
impl BitOrAssign for TicketFlags
fn bitor_assign(&mut self, other: TicketFlags)
fn bitor_assign(&mut self, other: TicketFlags)
Adds the set of flags.
impl BitXor for TicketFlags
impl BitXor for TicketFlags
type Output = TicketFlags
The resulting type after applying the ^
operator.
fn bitxor(self, other: TicketFlags) -> TicketFlags
fn bitxor(self, other: TicketFlags) -> TicketFlags
Returns the left flags, but with all the right flags toggled.
impl BitXorAssign for TicketFlags
impl BitXorAssign for TicketFlags
fn bitxor_assign(&mut self, other: TicketFlags)
fn bitxor_assign(&mut self, other: TicketFlags)
Toggles the set of flags.
impl BitAnd for TicketFlags
impl BitAnd for TicketFlags
type Output = TicketFlags
The resulting type after applying the &
operator.
fn bitand(self, other: TicketFlags) -> TicketFlags
fn bitand(self, other: TicketFlags) -> TicketFlags
Returns the intersection between the two sets of flags.
impl BitAndAssign for TicketFlags
impl BitAndAssign for TicketFlags
fn bitand_assign(&mut self, other: TicketFlags)
fn bitand_assign(&mut self, other: TicketFlags)
Disables all flags disabled in the set.
impl Sub for TicketFlags
impl Sub for TicketFlags
type Output = TicketFlags
The resulting type after applying the -
operator.
fn sub(self, other: TicketFlags) -> TicketFlags
fn sub(self, other: TicketFlags) -> TicketFlags
Returns the set difference of the two sets of flags.
impl SubAssign for TicketFlags
impl SubAssign for TicketFlags
fn sub_assign(&mut self, other: TicketFlags)
fn sub_assign(&mut self, other: TicketFlags)
Disables all flags enabled in the set.
impl Not for TicketFlags
impl Not for TicketFlags
type Output = TicketFlags
The resulting type after applying the !
operator.
fn not(self) -> TicketFlags
fn not(self) -> TicketFlags
Returns the complement of this set of flags.
impl Extend<TicketFlags> for TicketFlags
impl Extend<TicketFlags> for TicketFlags
fn extend<T: IntoIterator<Item = TicketFlags>>(&mut self, iterator: T)
fn extend<T: IntoIterator<Item = TicketFlags>>(&mut self, iterator: T)
Extends a collection with the contents of an iterator. Read more
impl FromIterator<TicketFlags> for TicketFlags
impl FromIterator<TicketFlags> for TicketFlags
fn from_iter<T: IntoIterator<Item = TicketFlags>>(iterator: T) -> TicketFlags
fn from_iter<T: IntoIterator<Item = TicketFlags>>(iterator: T) -> TicketFlags
Creates a value from an iterator. Read more
Auto Trait Implementations
impl Send for TicketFlags
impl Send for TicketFlags
impl Sync for TicketFlags
impl Sync for TicketFlags