pub struct SingleBufferEventProducer { /* private fields */ }
Expand description
An event producer for an event that has one buffer of data.
Implementations§
Source§impl SingleBufferEventProducer
impl SingleBufferEventProducer
Sourcepub fn existing(buffer: Vec<u8>) -> Self
pub fn existing(buffer: Vec<u8>) -> Self
Constructs a new SingleBufferEventProducer
that will produce an event for one name of
type WatchEvent::Existing
.
Trait Implementations§
Source§impl EventProducer for SingleBufferEventProducer
impl EventProducer for SingleBufferEventProducer
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 SingleBufferEventProducer
impl RefUnwindSafe for SingleBufferEventProducer
impl Send for SingleBufferEventProducer
impl Sync for SingleBufferEventProducer
impl Unpin for SingleBufferEventProducer
impl UnwindSafe for SingleBufferEventProducer
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