pub struct Handle { /* private fields */ }
Expand description

A non-sendable handle to an event loop, useful for manufacturing instances of LoopData.

Implementations

Returns a reference to the new Tokio handle

Returns a reference to the underlying remote handle to the event loop.

Spawns a new future on the event loop this handle is associated with.

Panics

This method will not catch panics from polling the future f. If the future panics then it’s the responsibility of the caller to catch that panic and handle it as appropriate.

Spawns a new future onto the threadpool

Panics

This function panics if the spawn fails. Failure occurs if the executor is currently at capacity and is unable to spawn a new future.

Spawns a closure on this event loop.

This function is a convenience wrapper around the spawn function above for running a closure wrapped in futures::lazy. It will spawn the function f provided onto the event loop, and continue to run the future returned by f on the event loop as well.

Panics

This method will not catch panics from polling the future f. If the future panics then it’s the responsibility of the caller to catch that panic and handle it as appropriate.

Return the ID of the represented Core

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

Spawns a future to run on this Executor, typically in the “background”. 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.