pub trait Sink<Item> {
type Error;
// Required methods
fn send(
&mut self,
item: Item,
) -> impl Future<Output = Result<(), Self::Error>>;
fn flush(&mut self) -> impl Future<Output = Result<(), Self::Error>>;
fn close(&mut self) -> impl Future<Output = Result<(), Self::Error>>;
}
Expand description
A Sink
is a value into which other values can be sent in pure async/await.
Required Associated Types§
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.