Skip to main content

OutputEventBuffer

Trait OutputEventBuffer 

Source
pub trait OutputEventBuffer: Sized {
    // Required method
    fn try_push(&mut self, event: &UnknownEvent) -> Result<(), TryPushError>;
}
Expand description

A trait for all types which can act as an ordered queue for outbound UnknownEvents.

This is the backing implementation of an OutputEvents, which is how output events are shared from the CLAP plugin to the host.

Note that events are indexed using u32 instead of the standard usize, to match the CLAP specification.

Required Methods§

Source

fn try_push(&mut self, event: &UnknownEvent) -> Result<(), TryPushError>

Attempts to push a given event to the queue.

§Errors

This may return a TryPushError if the event couldn’t be pushed for any reason (e.g. the underlying implementation ran out of buffer space).

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'a, T> OutputEventBuffer for Option<T>
where T: Event<EventSpace<'a> = CoreEventSpace<'a>> + Clone,

Source§

fn try_push(&mut self, event: &UnknownEvent) -> Result<(), TryPushError>

Source§

impl<'a, T> OutputEventBuffer for Vec<T>
where T: Event<EventSpace<'a> = CoreEventSpace<'a>> + Clone,

Source§

fn try_push(&mut self, event: &UnknownEvent) -> Result<(), TryPushError>

Implementors§