pub struct OutputEventConsumer { /* private fields */ }Expand description
A Send + Sync handle for draining every owned event a plugin emits.
Implementations§
Source§impl OutputEventConsumer
impl OutputEventConsumer
Sourcepub fn pop(&self) -> Option<PluginEvent>
pub fn pop(&self) -> Option<PluginEvent>
Pop the oldest emitted event, or None if none are queued.
Sourcepub fn drain(&self) -> Vec<PluginEvent>
pub fn drain(&self) -> Vec<PluginEvent>
Drain all currently queued events in emission order.
Trait Implementations§
Source§impl Clone for OutputEventConsumer
impl Clone for OutputEventConsumer
Source§fn clone(&self) -> OutputEventConsumer
fn clone(&self) -> OutputEventConsumer
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for OutputEventConsumer
impl RefUnwindSafe for OutputEventConsumer
impl Send for OutputEventConsumer
impl Sync for OutputEventConsumer
impl Unpin for OutputEventConsumer
impl UnsafeUnpin for OutputEventConsumer
impl UnwindSafe for OutputEventConsumer
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