pub struct DeviceSignal(/* private fields */);Implementations§
Source§impl DeviceSignal
impl DeviceSignal
Sourcepub const READABLE: DeviceSignal
pub const READABLE: DeviceSignal
Indicates the device is ready for reading.
Sourcepub const OOB: DeviceSignal
pub const OOB: DeviceSignal
Indicates an out-of-band state transition has occurred.
Sourcepub const WRITABLE: DeviceSignal
pub const WRITABLE: DeviceSignal
Indicates the device is ready for writing.
Sourcepub const ERROR: DeviceSignal
pub const ERROR: DeviceSignal
Indicates the device has encountered an error state.
Sourcepub const HANGUP: DeviceSignal
pub const HANGUP: DeviceSignal
Indicates the device has hung up on the current connection.
Source§impl DeviceSignal
impl DeviceSignal
Sourcepub const fn empty() -> DeviceSignal
pub const fn empty() -> DeviceSignal
Get a flags value with all bits unset.
Sourcepub const fn all() -> DeviceSignal
pub const fn all() -> DeviceSignal
Get a flags value with all known bits set.
Sourcepub const fn bits(&self) -> u32
pub const fn bits(&self) -> u32
Get the underlying bits value.
The returned value is exactly the bits set in this flags value.
Sourcepub const fn from_bits(bits: u32) -> Option<DeviceSignal>
pub const fn from_bits(bits: u32) -> Option<DeviceSignal>
Convert from a bits value.
This method will return None if any unknown bits are set.
Sourcepub const fn from_bits_truncate(bits: u32) -> DeviceSignal
pub const fn from_bits_truncate(bits: u32) -> DeviceSignal
Convert from a bits value, unsetting any unknown bits.
Sourcepub const fn from_bits_retain(bits: u32) -> DeviceSignal
pub const fn from_bits_retain(bits: u32) -> DeviceSignal
Convert from a bits value exactly.
Sourcepub fn from_name(name: &str) -> Option<DeviceSignal>
pub fn from_name(name: &str) -> Option<DeviceSignal>
Get a flags value with the bits of a flag with the given name set.
This method will return None if name is empty or doesn’t
correspond to any named flag.
Sourcepub const fn intersects(&self, other: DeviceSignal) -> bool
pub const fn intersects(&self, other: DeviceSignal) -> bool
Whether any set bits in other are also set in self.
Sourcepub const fn contains(&self, other: DeviceSignal) -> bool
pub const fn contains(&self, other: DeviceSignal) -> bool
Whether all set bits in other are also set in self.
Sourcepub fn insert(&mut self, other: DeviceSignal)
pub fn insert(&mut self, other: DeviceSignal)
The bitwise or (|) of the bits in self and other.
Sourcepub fn remove(&mut self, other: DeviceSignal)
pub fn remove(&mut self, other: DeviceSignal)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
remove won’t truncate other, but the ! operator will.
Sourcepub fn toggle(&mut self, other: DeviceSignal)
pub fn toggle(&mut self, other: DeviceSignal)
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub fn set(&mut self, other: DeviceSignal, value: bool)
pub fn set(&mut self, other: DeviceSignal, value: bool)
Call insert when value is true or remove when value is false.
Sourcepub const fn intersection(self, other: DeviceSignal) -> DeviceSignal
pub const fn intersection(self, other: DeviceSignal) -> DeviceSignal
The bitwise and (&) of the bits in self and other.
Sourcepub const fn union(self, other: DeviceSignal) -> DeviceSignal
pub const fn union(self, other: DeviceSignal) -> DeviceSignal
The bitwise or (|) of the bits in self and other.
Sourcepub const fn difference(self, other: DeviceSignal) -> DeviceSignal
pub const fn difference(self, other: DeviceSignal) -> DeviceSignal
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Sourcepub const fn symmetric_difference(self, other: DeviceSignal) -> DeviceSignal
pub const fn symmetric_difference(self, other: DeviceSignal) -> DeviceSignal
The bitwise exclusive-or (^) of the bits in self and other.
Sourcepub const fn complement(self) -> DeviceSignal
pub const fn complement(self) -> DeviceSignal
The bitwise negation (!) of the bits in self, truncating the result.
Source§impl DeviceSignal
impl DeviceSignal
Sourcepub const fn iter(&self) -> Iter<DeviceSignal> ⓘ
pub const fn iter(&self) -> Iter<DeviceSignal> ⓘ
Yield a set of contained flags values.
Each yielded flags value will correspond to a defined named flag. Any unknown bits will be yielded together as a final flags value.
Sourcepub const fn iter_names(&self) -> IterNames<DeviceSignal> ⓘ
pub const fn iter_names(&self) -> IterNames<DeviceSignal> ⓘ
Yield a set of contained named flags values.
This method is like iter, except only yields bits in contained named flags.
Any unknown bits, or bits not corresponding to a contained flag will not be yielded.
Trait Implementations§
Source§impl Binary for DeviceSignal
impl Binary for DeviceSignal
Source§impl BitAnd for DeviceSignal
impl BitAnd for DeviceSignal
Source§fn bitand(self, other: DeviceSignal) -> DeviceSignal
fn bitand(self, other: DeviceSignal) -> DeviceSignal
The bitwise and (&) of the bits in self and other.
Source§type Output = DeviceSignal
type Output = DeviceSignal
& operator.Source§impl BitAndAssign for DeviceSignal
impl BitAndAssign for DeviceSignal
Source§fn bitand_assign(&mut self, other: DeviceSignal)
fn bitand_assign(&mut self, other: DeviceSignal)
The bitwise and (&) of the bits in self and other.
Source§impl BitOr for DeviceSignal
impl BitOr for DeviceSignal
Source§fn bitor(self, other: DeviceSignal) -> DeviceSignal
fn bitor(self, other: DeviceSignal) -> DeviceSignal
The bitwise or (|) of the bits in self and other.
Source§type Output = DeviceSignal
type Output = DeviceSignal
| operator.Source§impl BitOrAssign for DeviceSignal
impl BitOrAssign for DeviceSignal
Source§fn bitor_assign(&mut self, other: DeviceSignal)
fn bitor_assign(&mut self, other: DeviceSignal)
The bitwise or (|) of the bits in self and other.
Source§impl BitXor for DeviceSignal
impl BitXor for DeviceSignal
Source§fn bitxor(self, other: DeviceSignal) -> DeviceSignal
fn bitxor(self, other: DeviceSignal) -> DeviceSignal
The bitwise exclusive-or (^) of the bits in self and other.
Source§type Output = DeviceSignal
type Output = DeviceSignal
^ operator.Source§impl BitXorAssign for DeviceSignal
impl BitXorAssign for DeviceSignal
Source§fn bitxor_assign(&mut self, other: DeviceSignal)
fn bitxor_assign(&mut self, other: DeviceSignal)
The bitwise exclusive-or (^) of the bits in self and other.
Source§impl Clone for DeviceSignal
impl Clone for DeviceSignal
Source§fn clone(&self) -> DeviceSignal
fn clone(&self) -> DeviceSignal
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for DeviceSignal
Source§impl Debug for DeviceSignal
impl Debug for DeviceSignal
Source§impl<D> Decode<DeviceSignal, D> for DeviceSignalwhere
D: ResourceDialect,
impl<D> Decode<DeviceSignal, D> for DeviceSignalwhere
D: ResourceDialect,
Source§fn new_empty() -> DeviceSignal
fn new_empty() -> DeviceSignal
Self. The specific value does not matter,
since it will be overwritten by decode.Source§impl Default for DeviceSignal
impl Default for DeviceSignal
Source§fn default() -> DeviceSignal
fn default() -> DeviceSignal
Source§impl<D> Encode<DeviceSignal, D> for DeviceSignalwhere
D: ResourceDialect,
impl<D> Encode<DeviceSignal, D> for DeviceSignalwhere
D: ResourceDialect,
impl Eq for DeviceSignal
Source§impl Extend<DeviceSignal> for DeviceSignal
impl Extend<DeviceSignal> for DeviceSignal
Source§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DeviceSignal>,
fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = DeviceSignal>,
The bitwise or (|) of the bits in each flags value.
Source§fn extend_one(&mut self, item: T)
fn extend_one(&mut self, item: T)
extend_one)Source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one)Source§impl Flags for DeviceSignal
impl Flags for DeviceSignal
Source§const FLAGS: &'static [Flag<DeviceSignal>]
const FLAGS: &'static [Flag<DeviceSignal>]
Source§fn from_bits_retain(bits: u32) -> DeviceSignal
fn from_bits_retain(bits: u32) -> DeviceSignal
Source§fn all_named() -> DeviceSignal
fn all_named() -> DeviceSignal
Source§fn known_bits(&self) -> Self::Bits
fn known_bits(&self) -> Self::Bits
Source§fn unknown_bits(&self) -> Self::Bits
fn unknown_bits(&self) -> Self::Bits
Source§fn contains_unknown_bits(&self) -> bool
fn contains_unknown_bits(&self) -> bool
true if any unknown bits are set.Source§fn from_bits_truncate(bits: Self::Bits) -> Self
fn from_bits_truncate(bits: Self::Bits) -> Self
Source§fn from_name(name: &str) -> Option<Self>
fn from_name(name: &str) -> Option<Self>
Source§fn iter_names(&self) -> IterNames<Self> ⓘ
fn iter_names(&self) -> IterNames<Self> ⓘ
Source§fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
fn iter_defined_names() -> IterDefinedNames<Self> ⓘ
Self::FLAGS.Source§fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
fn iter_equal_names(&self) -> IterEqualNames<Self> ⓘ
Source§fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
fn intersects(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn contains(&self, other: Self) -> boolwhere
Self: Sized,
fn contains(&self, other: Self) -> boolwhere
Self: Sized,
other are also set in self.Source§fn insert(&mut self, other: Self)where
Self: Sized,
fn insert(&mut self, other: Self)where
Self: Sized,
|) of the bits in self and other.Source§fn toggle(&mut self, other: Self)where
Self: Sized,
fn toggle(&mut self, other: Self)where
Self: Sized,
^) of the bits in self and other.Source§fn intersection(self, other: Self) -> Self
fn intersection(self, other: Self) -> Self
&) of the bits in self and other.Source§fn difference(self, other: Self) -> Self
fn difference(self, other: Self) -> Self
Source§fn symmetric_difference(self, other: Self) -> Self
fn symmetric_difference(self, other: Self) -> Self
^) of the bits in self and other.Source§fn complement(self) -> Self
fn complement(self) -> Self
!) of the bits in self, truncating the result.Source§impl FromIterator<DeviceSignal> for DeviceSignal
impl FromIterator<DeviceSignal> for DeviceSignal
Source§fn from_iter<T>(iterator: T) -> DeviceSignalwhere
T: IntoIterator<Item = DeviceSignal>,
fn from_iter<T>(iterator: T) -> DeviceSignalwhere
T: IntoIterator<Item = DeviceSignal>,
The bitwise or (|) of the bits in each flags value.
Source§impl Hash for DeviceSignal
impl Hash for DeviceSignal
Source§impl IntoIterator for DeviceSignal
impl IntoIterator for DeviceSignal
Source§type Item = DeviceSignal
type Item = DeviceSignal
Source§type IntoIter = Iter<DeviceSignal>
type IntoIter = Iter<DeviceSignal>
Source§fn into_iter(self) -> <DeviceSignal as IntoIterator>::IntoIter
fn into_iter(self) -> <DeviceSignal as IntoIterator>::IntoIter
Source§impl LowerHex for DeviceSignal
impl LowerHex for DeviceSignal
Source§impl Not for DeviceSignal
impl Not for DeviceSignal
Source§fn not(self) -> DeviceSignal
fn not(self) -> DeviceSignal
The bitwise negation (!) of the bits in self, truncating the result.
Source§type Output = DeviceSignal
type Output = DeviceSignal
! operator.Source§impl Octal for DeviceSignal
impl Octal for DeviceSignal
Source§impl Ord for DeviceSignal
impl Ord for DeviceSignal
Source§fn cmp(&self, other: &DeviceSignal) -> Ordering
fn cmp(&self, other: &DeviceSignal) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for DeviceSignal
impl PartialEq for DeviceSignal
Source§impl PartialOrd for DeviceSignal
impl PartialOrd for DeviceSignal
impl StructuralPartialEq for DeviceSignal
Source§impl Sub for DeviceSignal
impl Sub for DeviceSignal
Source§fn sub(self, other: DeviceSignal) -> DeviceSignal
fn sub(self, other: DeviceSignal) -> DeviceSignal
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§type Output = DeviceSignal
type Output = DeviceSignal
- operator.Source§impl SubAssign for DeviceSignal
impl SubAssign for DeviceSignal
Source§fn sub_assign(&mut self, other: DeviceSignal)
fn sub_assign(&mut self, other: DeviceSignal)
The intersection of self with the complement of other (&!).
This method is not equivalent to self & !other when other has unknown bits set.
difference won’t truncate other, but the ! operator will.
Source§impl TypeMarker for DeviceSignal
impl TypeMarker for DeviceSignal
Source§type Owned = DeviceSignal
type Owned = DeviceSignal
Source§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Source§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
inline_align.Source§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and encoding requires no validation. When true, we can optimize
encoding arrays and vectors of Self::Owned to a single memcpy. Read moreSource§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Self::Owned matches the FIDL wire
format and decoding requires no validation. When true, we can optimize
decoding arrays and vectors of Self::Owned to a single memcpy.Source§impl UpperHex for DeviceSignal
impl UpperHex for DeviceSignal
Source§impl ValueTypeMarker for DeviceSignal
impl ValueTypeMarker for DeviceSignal
Source§type Borrowed<'a> = DeviceSignal
type Borrowed<'a> = DeviceSignal
Encode<Self>
type cheaply obtainable from &Self::Owned. There are three cases: Read moreSource§fn borrow(
value: &<DeviceSignal as TypeMarker>::Owned,
) -> <DeviceSignal as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<DeviceSignal as TypeMarker>::Owned, ) -> <DeviceSignal as ValueTypeMarker>::Borrowed<'_>
&Self::Owned to Self::Borrowed.