Struct drain::Watch

source · []
pub struct Watch { /* private fields */ }
Expand description

Watch for a drain command.

All Watch instances must be dropped for a Signal::signal call to complete.

Implementations

Returns a ReleaseShutdown handle after the drain has been signaled. The handle must be dropped when a shutdown action has been completed to unblock graceful shutdown.

Return a ReleaseShutdown handle immediately, ignoring the release signal.

This is intended to allow a task to block shutdown until it completes.

Wrap a future and a callback that is triggered when drain is received.

The callback receives a mutable reference to the original future, and should be used to trigger any shutdown process for it.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. 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 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)

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.