pub struct ChanMgr<R: Runtime> { /* private fields */ }
Expand description

A Type that remembers a set of live channels, and launches new ones on request.

Use the ChanMgr::get_or_launch function to create a new channel, or get one if it exists.

Implementations

Construct a new channel manager.

Usage note

For the manager to work properly, you will need to call ChanMgr::launch_background_tasks.

Launch the periodic daemon task required by the manager to function properly.

Returns a TaskHandle that can be used to manage the daemon task.

Try to get a suitable channel to the provided target, launching one if one does not exist.

If there is already a channel launch attempt in progress, this function will wait until that launch is complete, and succeed or fail depending on its outcome.

Return a stream of ConnStatus events to tell us about changes in our ability to connect to the internet.

Note that this stream can be lossy: the caller will not necessarily observe every event on the stream

Expire all channels that have been unused for too long.

Return the duration from now until next channel expires.

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.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

Should always be Self

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.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more