pub struct ContinuousClosureSink<T, E> { /* private fields */ }
Expand description

Block acting as Consumer, which uses a callback as sink and aborts when stream is reset

The type argument E indicates a possible reported error type by the callback.

Implementations

Create block which invokes the process closure for received data

Create block which invokes the process closure for received data and awaits its result

This function is the same as ContinuousClosureSink::new but accepts an asynchronously working closure.

Consume the block but continue operation until interruption or completion

Wait for stream to finish

Returns Ok(true) if connected Producer indicated completion through Sender::finish (RecvError::Finished). Returns Ok(false) if operation could not complete because no Producer is connected.

Stop operation

Returns Ok(true) if connected Producer indicated completion through Sender::finish (RecvError::Finished). Returns Ok(false) if operation was stopped before.

Trait Implementations

Obtain reference to ReceiverConnector
Connect Consumer to Producer
Disconnect Consumer from any connected Producer if connected
👎Deprecated since 0.2.0: method has been renamed to feed_from
Connect Consumer to Producer
👎Deprecated since 0.2.0: method has been renamed to feed_from_none
Disconnect Consumer from any connected Producer if connected

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.