Struct Fanout

struct Fanout<Si1, Si2> { ... }

Sink that clones incoming items and forwards them to two sinks at the same time.

Backpressure from any downstream sink propagates up, which means that this sink can only process items as fast as its slowest downstream sink.

Implementations

impl<Si1, Si2> Fanout<Si1, Si2>

fn get_ref(self: &Self) -> (&Si1, &Si2)

Get a shared reference to the inner sinks.

fn get_mut(self: &mut Self) -> (&mut Si1, &mut Si2)

Get a mutable reference to the inner sinks.

fn get_pin_mut(self: Pin<&mut Self>) -> (Pin<&mut Si1>, Pin<&mut Si2>)

Get a pinned mutable reference to the inner sinks.

fn into_inner(self: Self) -> (Si1, Si2)

Consumes this combinator, returning the underlying sinks.

Note that this may discard intermediate state of this combinator, so care should be taken to avoid losing resources when this is called.

impl<'__pin, Si1, Si2> Unpin for Fanout<Si1, Si2>

impl<Si1, Si2> Freeze for Fanout<Si1, Si2>

impl<Si1, Si2> RefUnwindSafe for Fanout<Si1, Si2>

impl<Si1, Si2> Send for Fanout<Si1, Si2>

impl<Si1, Si2> Sync for Fanout<Si1, Si2>

impl<Si1, Si2> UnsafeUnpin for Fanout<Si1, Si2>

impl<Si1, Si2> UnwindSafe for Fanout<Si1, Si2>

impl<Si1, Si2, Item> Sink for Fanout<Si1, Si2>

fn poll_ready(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
fn start_send(self: Pin<&mut Self>, item: Item) -> Result<(), <Self as >::Error>
fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>
fn poll_close(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<Result<(), <Self as >::Error>>

impl<Si1: Debug, Si2: Debug> Debug for Fanout<Si1, Si2>

fn fmt(self: &Self, f: &mut Formatter<'_>) -> FmtResult

impl<T> Any for Fanout<Si1, Si2>

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for Fanout<Si1, Si2>

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for Fanout<Si1, Si2>

fn borrow_mut(self: &mut Self) -> &mut T

impl<T> From for Fanout<Si1, Si2>

fn from(t: T) -> T

Returns the argument unchanged.

impl<T, Item> SinkExt for Fanout<Si1, Si2>

impl<T, U> Into for Fanout<Si1, Si2>

fn into(self: Self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

impl<T, U> TryFrom for Fanout<Si1, Si2>

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

impl<T, U> TryInto for Fanout<Si1, Si2>

fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>