Struct async_shutdown::DelayShutdownToken[][src]

pub struct DelayShutdownToken { /* fields omitted */ }
Expand description

Token that delays completion of a shutdown as long as it exists.

The token can be cloned and sent to different threads and tasks freely.

All clones must be dropped before the shutdown can complete.

Implementations

Wrap a future to delay shutdown completion until it completes.

This consumes the token to avoid keeping an unused token around by accident, which would delay shutdown indefinately. If you wish to use the token multiple times, you can clone it first: token.clone().wrap_wait(...).

The returned future transparently completes with the value of the wrapped future. However, the shutdown will not be considered complete until the future completes or is dropped.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

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.