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