Skip to main content

JoinHandle

Trait JoinHandle 

Source
pub trait JoinHandle<O>: Future<Output = Result<O, Self::JoinError>> + Unpin {
    type JoinError: Error + Into<Error> + Send + Sync + 'static;

    // Required method
    fn abort(self);

    // Provided method
    fn detach(self)
       where Self: Sized { ... }
}
Expand description

Joinhanlde trait

Required Associated Types§

Source

type JoinError: Error + Into<Error> + Send + Sync + 'static

Available on crate feature std only.

The error type for the join handle

Required Methods§

Source

fn abort(self)

Aborts the task related to this handle.

Provided Methods§

Source

fn detach(self)
where Self: Sized,

Detaches the task to let it keep running in the background.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> JoinHandle<T> for JoinHandle<T>

Source§

type JoinError = JoinError

Available on crate feature std only.
Source§

fn abort(self)

Implementors§

Source§

impl<T> JoinHandle<T> for agnostic_lite::smol::JoinHandle<T>