Struct fidl::handle::fuchsia_handles::Signals
pub struct Signals { /* private fields */ }
Expand description
Signals that can be waited upon.
See Objects and signals in the Zircon kernel documentation. Note: the names of signals are still in flux.
Implementations§
§impl Signals
impl Signals
pub const NONE: Signals = _
pub const OBJECT_ALL: Signals = _
pub const USER_ALL: Signals = _
pub const OBJECT_0: Signals = _
pub const OBJECT_1: Signals = _
pub const OBJECT_2: Signals = _
pub const OBJECT_3: Signals = _
pub const OBJECT_4: Signals = _
pub const OBJECT_5: Signals = _
pub const OBJECT_6: Signals = _
pub const OBJECT_7: Signals = _
pub const OBJECT_8: Signals = _
pub const OBJECT_9: Signals = _
pub const OBJECT_10: Signals = _
pub const OBJECT_11: Signals = _
pub const OBJECT_12: Signals = _
pub const OBJECT_13: Signals = _
pub const OBJECT_14: Signals = _
pub const OBJECT_15: Signals = _
pub const OBJECT_16: Signals = _
pub const OBJECT_17: Signals = _
pub const OBJECT_18: Signals = _
pub const OBJECT_19: Signals = _
pub const OBJECT_20: Signals = _
pub const OBJECT_21: Signals = _
pub const OBJECT_22: Signals = _
pub const OBJECT_HANDLE_CLOSED: Signals = _
pub const USER_0: Signals = _
pub const USER_1: Signals = _
pub const USER_2: Signals = _
pub const USER_3: Signals = _
pub const USER_4: Signals = _
pub const USER_5: Signals = _
pub const USER_6: Signals = _
pub const USER_7: Signals = _
pub const OBJECT_READABLE: Signals = _
pub const OBJECT_WRITABLE: Signals = _
pub const OBJECT_PEER_CLOSED: Signals = _
pub const HANDLE_CLOSED: Signals = _
pub const EVENT_SIGNALED: Signals = _
pub const EVENTPAIR_SIGNALED: Signals = _
pub const EVENTPAIR_PEER_CLOSED: Signals = _
pub const TASK_TERMINATED: Signals = _
pub const CHANNEL_READABLE: Signals = _
pub const CHANNEL_WRITABLE: Signals = _
pub const CHANNEL_PEER_CLOSED: Signals = _
pub const CLOCK_STARTED: Signals = _
pub const SOCKET_READABLE: Signals = _
pub const SOCKET_WRITABLE: Signals = _
pub const SOCKET_PEER_CLOSED: Signals = _
pub const SOCKET_PEER_WRITE_DISABLED: Signals = _
pub const SOCKET_WRITE_DISABLED: Signals = _
pub const SOCKET_READ_THRESHOLD: Signals = _
pub const SOCKET_WRITE_THRESHOLD: Signals = _
pub const RESOURCE_DESTROYED: Signals = _
pub const RESOURCE_READABLE: Signals = _
pub const RESOURCE_WRITABLE: Signals = _
pub const RESOURCE_CHILD_ADDED: Signals = _
pub const FIFO_READABLE: Signals = _
pub const FIFO_WRITABLE: Signals = _
pub const FIFO_PEER_CLOSED: Signals = _
pub const JOB_TERMINATED: Signals = _
pub const JOB_NO_JOBS: Signals = _
pub const JOB_NO_PROCESSES: Signals = _
pub const PROCESS_TERMINATED: Signals = _
pub const THREAD_TERMINATED: Signals = _
pub const THREAD_RUNNING: Signals = _
pub const THREAD_SUSPENDED: Signals = _
pub const LOG_READABLE: Signals = _
pub const LOG_WRITABLE: Signals = _
pub const TIMER_SIGNALED: Signals = _
pub const VMO_ZERO_CHILDREN: Signals = _
pub const fn from_bits(bits: u32) -> Option<Signals>
pub const fn from_bits(bits: u32) -> Option<Signals>
Convert from underlying bit representation, unless that representation contains bits that do not correspond to a flag.
pub const fn from_bits_truncate(bits: u32) -> Signals
pub const fn from_bits_truncate(bits: u32) -> Signals
Convert from underlying bit representation, dropping any bits that do not correspond to flags.
pub const unsafe fn from_bits_unchecked(bits: u32) -> Signals
pub const unsafe fn from_bits_unchecked(bits: u32) -> Signals
Convert from underlying bit representation, preserving all bits (even those not corresponding to a defined flag).
Safety
The caller of the bitflags!
macro can chose to allow or
disallow extra bits for their bitflags type.
The caller of from_bits_unchecked()
has to ensure that
all bits correspond to a defined flag or that extra bits
are valid for this bitflags type.
pub const fn intersects(&self, other: Signals) -> bool
pub const fn intersects(&self, other: Signals) -> bool
Returns true
if there are flags common to both self
and other
.
pub const fn contains(&self, other: Signals) -> bool
pub const fn contains(&self, other: Signals) -> bool
Returns true
if all of the flags in other
are contained within self
.
pub fn set(&mut self, other: Signals, value: bool)
pub fn set(&mut self, other: Signals, value: bool)
Inserts or removes the specified flags depending on the passed value.
pub const fn intersection(self, other: Signals) -> Signals
pub const fn intersection(self, other: Signals) -> Signals
Returns the intersection between the flags in self
and
other
.
Specifically, the returned set contains only the flags which are
present in both self
and other
.
This is equivalent to using the &
operator (e.g.
ops::BitAnd
), as in flags & other
.
pub const fn union(self, other: Signals) -> Signals
pub const fn union(self, other: Signals) -> Signals
Returns the union of between the flags in self
and other
.
Specifically, the returned set contains all flags which are
present in either self
or other
, including any which are
present in both (see Self::symmetric_difference
if that
is undesirable).
This is equivalent to using the |
operator (e.g.
ops::BitOr
), as in flags | other
.
pub const fn difference(self, other: Signals) -> Signals
pub const fn difference(self, other: Signals) -> Signals
Returns the difference between the flags in self
and other
.
Specifically, the returned set contains all flags present in
self
, except for the ones present in other
.
It is also conceptually equivalent to the “bit-clear” operation:
flags & !other
(and this syntax is also supported).
This is equivalent to using the -
operator (e.g.
ops::Sub
), as in flags - other
.
pub const fn symmetric_difference(self, other: Signals) -> Signals
pub const fn symmetric_difference(self, other: Signals) -> Signals
Returns the symmetric difference between the flags
in self
and other
.
Specifically, the returned set contains the flags present which
are present in self
or other
, but that are not present in
both. Equivalently, it contains the flags present in exactly
one of the sets self
and other
.
This is equivalent to using the ^
operator (e.g.
ops::BitXor
), as in flags ^ other
.
pub const fn complement(self) -> Signals
pub const fn complement(self) -> Signals
Returns the complement of this set of flags.
Specifically, the returned set contains all the flags which are
not set in self
, but which are allowed for this type.
Alternatively, it can be thought of as the set difference
between Self::all()
and self
(e.g. Self::all() - self
)
This is equivalent to using the !
operator (e.g.
ops::Not
), as in !flags
.
Trait Implementations§
§impl BitAndAssign for Signals
impl BitAndAssign for Signals
§fn bitand_assign(&mut self, other: Signals)
fn bitand_assign(&mut self, other: Signals)
Disables all flags disabled in the set.
§impl BitOrAssign for Signals
impl BitOrAssign for Signals
§fn bitor_assign(&mut self, other: Signals)
fn bitor_assign(&mut self, other: Signals)
Adds the set of flags.
§impl BitXorAssign for Signals
impl BitXorAssign for Signals
§fn bitxor_assign(&mut self, other: Signals)
fn bitxor_assign(&mut self, other: Signals)
Toggles the set of flags.
§impl Extend<Signals> for Signals
impl Extend<Signals> for Signals
§fn extend<T>(&mut self, iterator: T)where
T: IntoIterator<Item = Signals>,
fn extend<T>(&mut self, iterator: T)where T: IntoIterator<Item = Signals>,
source§fn extend_one(&mut self, item: A)
fn extend_one(&mut self, item: A)
extend_one
)source§fn extend_reserve(&mut self, additional: usize)
fn extend_reserve(&mut self, additional: usize)
extend_one
)§impl FromIterator<Signals> for Signals
impl FromIterator<Signals> for Signals
§impl Ord for Signals
impl Ord for Signals
§impl PartialOrd for Signals
impl PartialOrd for Signals
§fn partial_cmp(&self, other: &Signals) -> Option<Ordering>
fn partial_cmp(&self, other: &Signals) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more§impl SubAssign for Signals
impl SubAssign for Signals
§fn sub_assign(&mut self, other: Signals)
fn sub_assign(&mut self, other: Signals)
Disables all flags enabled in the set.