Struct side_futures::FuturesReceiver[][src]

pub struct FuturesReceiver(_);
Expand description

Receiver channel for futures sent with sender, can be used to run received futures manually or (most likely) using FuturesReceiver::run_receiver() method

Implementations

Run futures sent by sender using runtime-specific tasks spawner

Methods from Deref<Target = UnboundedReceiver<Pin<Box<dyn Future<Output = ()> + Send>>>>

Closes the receiving half of a channel, without dropping it.

This prevents any further messages from being sent on the channel while still enabling the receiver to drain messages that are buffered.

Tries to receive the next message without notifying a context if empty.

It is not recommended to call this function from inside of a future, only when you’ve otherwise arranged to be notified when the channel is no longer empty.

This function returns:

  • Ok(Some(t)) when message is fetched
  • Ok(None) when channel is closed and no messages left in the queue
  • Err(e) when there are no messages available, but channel is not yet closed

Trait Implementations

Formats the value using the given formatter. Read more

The resulting type after dereferencing.

Dereferences the value.

Mutably dereferences the value.

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

Performs the conversion.

Performs the conversion.

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.