[]Struct weechat::JoinHandle

pub struct JoinHandle<R, T> { /* fields omitted */ }
This is supported on async only.

A handle that awaits the result of a task.

This type is a future that resolves to an Option<R> where:

  • None indicates the task has panicked or was canceled.
  • Some(result) indicates the task has completed with result of type R.

Implementations

impl<R, T> JoinHandle<R, T>

pub fn cancel(&self)

This is supported on async only.

Cancels the task.

If the task has already completed, calling this method will have no effect.

When a task is canceled, its future will not be polled again.

pub fn tag(&self) -> &T

This is supported on async only.

Returns a reference to the tag stored inside the task.

pub fn waker(&self) -> Waker

This is supported on async only.

Returns a waker associated with the task.

Trait Implementations

impl<R, T> Debug for JoinHandle<R, T>

impl<R, T> Drop for JoinHandle<R, T>

impl<R, T> Future for JoinHandle<R, T>

type Output = Option<R>

The type of value produced on completion.

impl<R, T> Send for JoinHandle<R, T> where
    R: Send

impl<R, T> Sync for JoinHandle<R, T>

impl<R, T> Unpin for JoinHandle<R, T>

Auto Trait Implementations

impl<R, T> RefUnwindSafe for JoinHandle<R, T> where
    R: RefUnwindSafe,
    T: RefUnwindSafe

impl<R, T> UnwindSafe for JoinHandle<R, T> where
    R: UnwindSafe,
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future + ?Sized
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.