pub struct SingleNameEventProducer<'a> { /* private fields */ }
Expand description
An event producer for an event containing only one name.
Implementations§
Source§impl<'a> SingleNameEventProducer<'a>
impl<'a> SingleNameEventProducer<'a>
Sourcepub fn deleted() -> Self
pub fn deleted() -> Self
Constructs a new SingleNameEventProducer
that will produce an event for one name of
type WatchEvent::Deleted
. Deleted refers to the directory the watcher itself is on, and
therefore statically refers to itself as “.”.
Sourcepub fn added(name: &'a str) -> Self
pub fn added(name: &'a str) -> Self
Constructs a new SingleNameEventProducer
that will produce an event for one name of
type WatchEvent::Added
.
Sourcepub fn removed(name: &'a str) -> Self
pub fn removed(name: &'a str) -> Self
Constructs a new SingleNameEventProducer
that will produce an event for one name of
type WatchEvent::Removed
.
Sourcepub fn existing(name: &'a str) -> Self
pub fn existing(name: &'a str) -> Self
Constructs a new SingleNameEventProducer
that will produce an event for one name of
type WatchEvent::Existing
.
Sourcepub fn idle() -> Self
pub fn idle() -> Self
Constructs a new SingleNameEventProducer
that will produce an WatchEvent::Idle
event.
Trait Implementations§
Source§impl EventProducer for SingleNameEventProducer<'_>
impl EventProducer for SingleNameEventProducer<'_>
Source§fn mask(&self) -> WatchMask
fn mask(&self) -> WatchMask
Returns a mask that represents the type of events this producer can generate, as one of the
fidl_fuchsia_io::WatchMask::*
constants. There might be only one bit set and it should
correspond to the event returned by the Self::event()
method. It is a duplication, but it
helps the callers that need both masks and event IDs.Source§fn event(&self) -> WatchEvent
fn event(&self) -> WatchEvent
Returns an event ID this event producer will use to populate the buffers, as one of the
fidl_fuchsia_io::WatchEvent::*
constants. Must match what Self::mask()
, returns, see
there for details.Source§fn prepare_for_next_buffer(&mut self) -> bool
fn prepare_for_next_buffer(&mut self) -> bool
Checks if this producer can create another buffer, returning
true
if it can. This method
does not actually need to construct the buffer just yet, as an optimization if it will not
be needed.Auto Trait Implementations§
impl<'a> Freeze for SingleNameEventProducer<'a>
impl<'a> RefUnwindSafe for SingleNameEventProducer<'a>
impl<'a> Send for SingleNameEventProducer<'a>
impl<'a> Sync for SingleNameEventProducer<'a>
impl<'a> Unpin for SingleNameEventProducer<'a>
impl<'a> UnwindSafe for SingleNameEventProducer<'a>
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, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous1, D> for Twhere
D: ResourceDialect,
Source§impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
impl<T, D> Encode<Ambiguous2, D> for Twhere
D: ResourceDialect,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more