#[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§
Source§impl WatchEvent
impl WatchEvent
pub fn from_primitive(prim: u8) -> Option<Self>
pub const fn into_primitive(self) -> u8
pub fn is_unknown(&self) -> bool
👎Deprecated: Strict enums should not use
is_unknown
Trait Implementations§
Source§impl Clone for WatchEvent
impl Clone for WatchEvent
Source§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 moreSource§impl Debug for WatchEvent
impl Debug for WatchEvent
Source§impl<D: ResourceDialect> Decode<WatchEvent, D> for WatchEvent
impl<D: ResourceDialect> Decode<WatchEvent, D> for WatchEvent
Source§impl<D: ResourceDialect> Encode<WatchEvent, D> for WatchEvent
impl<D: ResourceDialect> Encode<WatchEvent, D> for WatchEvent
Source§impl Hash for WatchEvent
impl Hash for WatchEvent
Source§impl Ord for WatchEvent
impl Ord for WatchEvent
Source§fn cmp(&self, other: &WatchEvent) -> Ordering
fn cmp(&self, other: &WatchEvent) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for WatchEvent
impl PartialEq for WatchEvent
Source§impl PartialOrd for WatchEvent
impl PartialOrd for WatchEvent
Source§impl TypeMarker for WatchEvent
impl TypeMarker for WatchEvent
Source§type Owned = WatchEvent
type Owned = WatchEvent
The owned Rust type which this FIDL type decodes into.
Source§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.
Source§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
.Source§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 moreSource§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.Source§impl ValueTypeMarker for WatchEvent
impl ValueTypeMarker for WatchEvent
Source§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 moreimpl 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)