Trait brw::writer::Writer [−][src]
pub trait Writer: Sized {
type Item: Send + 'static;
type Ok: Send;
type Error: Error + Send;
fn op<'life0, 'async_trait>(
&'life0 mut self,
item: Self::Item
) -> Pin<Box<dyn Future<Output = Running<Result<Self::Ok, Self::Error>, Option<Self::Error>>> + Send + 'async_trait>>
where
'life0: 'async_trait,
Self: 'async_trait;
fn handle_result<'async_trait>(
res: Result<Self::Ok, Self::Error>
) -> Pin<Box<dyn Future<Output = Running<(), Option<Self::Error>>> + Send + 'async_trait>>
where
Self: Send + 'async_trait,
{ ... }
fn writer_loop<'async_trait, S>(
self,
items: S
) -> Pin<Box<dyn Future<Output = Result<(), Self::Error>> + Send + 'async_trait>>
where
S: Stream<Item = Self::Item> + Send + Unpin,
S: 'async_trait,
Self: Send + 'async_trait,
{ ... }
}
Expand description
Writer of the broker-reader-writer pattern
Associated Types
Required methods
Provided methods
Handles the result of each op
Returns a None
to stop the whole loop