pub struct Manager<T> { /* private fields */ }
Expand description

Manager of a channel.

A channel manager can be used to create Senders and Receivers for a channel, without having access to either. Its made for the following use case: restarting an actor which takes ownership of the Receiver and crashes, and to restart the actor we need another Receiver. Using the manager a new Receiver can be created, ensuring only a single Receiver is alive at any given time.

Implementations

Create a small bounded channel with a Manager.

Same as new_small but with a Manager.

Create a bounded channel with a Manager.

Same as new but with a Manager.

Create a new Sender.

Safety

See the safety nodes on Sender’s Clone implemenation, the same conditions apply here.

Attempt to create a new Receiver.

This will fail if there already is a receiver.

Trait Implementations

Formats the value using the given formatter. Read more

Executes the destructor for this type. Read more

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.