[][src]Struct async_ctx::Context

pub struct Context { /* fields omitted */ }

A future that can be completed externally as an asynchronous cancellation mechanism.

Resolves if any of the following occur:

Clones can be expected to refer to the same logical entity.

Methods

impl Context[src]

pub fn guard(&self) -> Guard[src]

Create a RAII guard that will complete this context (and any derived children) when the guard is dropped.

pub fn complete(&self)[src]

Complete this context (and any derived children).

pub fn child(&self) -> Self[src]

Derive a child context. Completion of the parent (self) will propagate to the child, but not vice-versa.

Trait Implementations

impl Clone for Context[src]

impl Default for Context[src]

impl Future for Context[src]

type Output = ()

The type of value produced on completion.

Auto Trait Implementations

impl RefUnwindSafe for Context

impl Send for Context

impl Sync for Context

impl Unpin for Context

impl UnwindSafe for Context

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, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.