Struct flo_stream::PublisherSink [−][src]
pub struct PublisherSink<Publisher> where
Publisher: MessagePublisher, { /* fields omitted */ }
Expand description
An implementation of the Sink trait that can be applied to publishers
Implementations
Provides access to the underlying MessagePublisher for this sink
Creates a subscription to this publisher
Any future messages sent here will also be sent to this subscriber. Returns None if the sink has been closed
Reserves a space for a message with the subscribers, returning when it’s ready
Waits until all subscribers have consumed all pending messages
Returns None if the sink has been closed.
Trait Implementations
impl<Publisher> Sink<<Publisher as MessagePublisher>::Message> for PublisherSink<Publisher> where
Publisher: MessagePublisher,
Self: Unpin,
impl<Publisher> Sink<<Publisher as MessagePublisher>::Message> for PublisherSink<Publisher> where
Publisher: MessagePublisher,
Self: Unpin,
Auto Trait Implementations
impl<Publisher> !RefUnwindSafe for PublisherSink<Publisher>
impl<Publisher> Send for PublisherSink<Publisher>
impl<Publisher> !Sync for PublisherSink<Publisher>
impl<Publisher> Unpin for PublisherSink<Publisher> where
Publisher: Unpin,
impl<Publisher> !UnwindSafe for PublisherSink<Publisher>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
impl<T, Item> SinkExt<Item> for T where
T: Sink<Item> + ?Sized,
Composes a function in front of the sink. Read more
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F> where
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Self::Error>>,
fn with_flat_map<U, St, F>(self, f: F) -> WithFlatMap<Self, Item, U, St, F> where
F: FnMut(U) -> St,
St: Stream<Item = Result<Item, Self::Error>>,
Composes a function in front of the sink. Read more
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::Error) -> E,
fn sink_map_err<E, F>(self, f: F) -> SinkMapErr<Self, F> where
F: FnOnce(Self::Error) -> E,
Transforms the error returned by the sink.
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E> where
Self::Error: Into<E>,
fn sink_err_into<E>(self) -> SinkErrInto<Self, Item, E> where
Self::Error: Into<E>,
Map this sink’s error to a different error type using the Into
trait. Read more
Adds a fixed-size buffer to the current sink. Read more
Fanout items to multiple sinks. Read more
Flush the sink, processing all pending items. Read more
A future that completes after the given item has been fully processed into the sink, including flushing. Read more
A future that completes after the given item has been received by the sink. Read more
A future that completes after the given stream has been fully processed into the sink, including flushing. Read more
fn left_sink<Si2>(self) -> Either<Self, Si2> where
Si2: Sink<Item, Error = Self::Error>,
fn left_sink<Si2>(self) -> Either<Self, Si2> where
Si2: Sink<Item, Error = Self::Error>,
Wrap this sink in an Either
sink, making it the left-hand variant
of that Either
. Read more
fn right_sink<Si1>(self) -> Either<Si1, Self> where
Si1: Sink<Item, Error = Self::Error>,
fn right_sink<Si1>(self) -> Either<Si1, Self> where
Si1: Sink<Item, Error = Self::Error>,
Wrap this stream in an Either
stream, making it the right-hand variant
of that Either
. Read more