pub struct StaticVecEventProducer { /* private fields */ }
Expand description
An EventProducer
that uses a Vec<String>
with names of the entires to be put into the
watcher event.
Implementations§
Source§impl StaticVecEventProducer
impl StaticVecEventProducer
Sourcepub fn added(names: Vec<String>) -> Self
pub fn added(names: Vec<String>) -> Self
Constructs a new EventProducer
that is producing names form the specified list,
building events of type WatchEvent::Added
. names
is not allowed to be empty.
Sourcepub fn removed(names: Vec<String>) -> Self
pub fn removed(names: Vec<String>) -> Self
Constructs a new EventProducer
that is producing names form the specified list,
building events of type WatchEvent::Removed
. names
is not allowed to be empty.
Sourcepub fn existing(names: Vec<String>) -> Self
pub fn existing(names: Vec<String>) -> Self
Constructs a new EventProducer
that is producing names form the specified list,
building events of type WatchEvent::Existing
. names
is not allowed to be empty.
Trait Implementations§
Source§impl EventProducer for StaticVecEventProducer
impl EventProducer for StaticVecEventProducer
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 Freeze for StaticVecEventProducer
impl RefUnwindSafe for StaticVecEventProducer
impl Send for StaticVecEventProducer
impl Sync for StaticVecEventProducer
impl Unpin for StaticVecEventProducer
impl UnwindSafe for StaticVecEventProducer
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