pub trait Sink<T> {
type Error;
// Required method
fn try_push(&mut self, val: T) -> Result<(), Self::Error>;
}Expand description
Accept events.
Error is the type returned when the sink cannot accept the value.
Sinks that never reject (e.g. overwrite rings) use
core::convert::Infallible.
§Implementors
crate::RingBuf— always succeeds (Error = Infallible).crate::seq_ring::Producer— always succeeds (Error = Infallible).crate::event_buf::Producer— returnsErr(val)when full (Error = T).