Enum WatchEvent
#[repr(u8)]pub enum WatchEvent {
Deleted = 0,
Added = 1,
Removed = 2,
Existing = 3,
Idle = 4,
}
Variants§
Deleted = 0
Indicates the directory being watched has been deleted. The name returned for this event
will be .
(dot), as it is refering to the directory itself.
Added = 1
Indicates a node has been created (either new or moved) into a directory.
Removed = 2
Identifies a node has been removed (either deleted or moved) from the directory.
Existing = 3
Identifies a node already existed in the directory when watching started.
Idle = 4
Identifies that no more EXISTING
events will be sent. The name returned for this event
will be empty, as it is not refering to a specific entry.
Implementations§
§impl WatchEvent
impl WatchEvent
pub fn from_primitive(prim: u8) -> Option<WatchEvent>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
§impl Clone for WatchEvent
impl Clone for WatchEvent
§fn clone(&self) -> WatchEvent
fn clone(&self) -> WatchEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for WatchEvent
impl Debug for WatchEvent
§impl<D> Decode<WatchEvent, D> for WatchEventwhere
D: ResourceDialect,
impl<D> Decode<WatchEvent, D> for WatchEventwhere
D: ResourceDialect,
§fn new_empty() -> WatchEvent
fn new_empty() -> WatchEvent
Creates a valid instance of
Self
. The specific value does not matter,
since it will be overwritten by decode
.§impl<D> Encode<WatchEvent, D> for WatchEventwhere
D: ResourceDialect,
impl<D> Encode<WatchEvent, D> for WatchEventwhere
D: ResourceDialect,
§impl Hash for WatchEvent
impl Hash for WatchEvent
§impl Ord for WatchEvent
impl Ord for WatchEvent
§impl PartialEq for WatchEvent
impl PartialEq for WatchEvent
§impl PartialOrd for WatchEvent
impl PartialOrd for WatchEvent
§impl TypeMarker for WatchEvent
impl TypeMarker for WatchEvent
§type Owned = WatchEvent
type Owned = WatchEvent
The owned Rust type which this FIDL type decodes into.
§fn inline_align(_context: Context) -> usize
fn inline_align(_context: Context) -> usize
Returns the minimum required alignment of the inline portion of the
encoded object. It must be a (nonzero) power of two.
§fn inline_size(_context: Context) -> usize
fn inline_size(_context: Context) -> usize
Returns the size of the inline portion of the encoded object, including
padding for alignment. Must be a multiple of
inline_align
.§fn encode_is_copy() -> bool
fn encode_is_copy() -> bool
Returns true if the memory layout of
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 more§fn decode_is_copy() -> bool
fn decode_is_copy() -> bool
Returns true if the memory layout of
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.§impl ValueTypeMarker for WatchEvent
impl ValueTypeMarker for WatchEvent
§type Borrowed<'a> = WatchEvent
type Borrowed<'a> = WatchEvent
The Rust type to use for encoding. This is a particular
Encode<Self>
type cheaply obtainable from &Self::Owned
. There are three cases: Read more§fn borrow(
value: &<WatchEvent as TypeMarker>::Owned,
) -> <WatchEvent as ValueTypeMarker>::Borrowed<'_>
fn borrow( value: &<WatchEvent as TypeMarker>::Owned, ) -> <WatchEvent as ValueTypeMarker>::Borrowed<'_>
Cheaply converts from
&Self::Owned
to Self::Borrowed
.impl Copy for WatchEvent
impl Eq for WatchEvent
impl StructuralPartialEq for WatchEvent
Auto Trait Implementations§
impl Freeze for WatchEvent
impl RefUnwindSafe for WatchEvent
impl Send for WatchEvent
impl Sync for WatchEvent
impl Unpin for WatchEvent
impl UnwindSafe for WatchEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more