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