Trait ctx::InnerContext [] [src]

pub trait InnerContext: Future<Item = (), Error = ContextError> {
    fn deadline(&self) -> Option<Instant> { ... }
    fn value(&self) -> Option<&Any> { ... }
    fn parent(&self) -> Option<Context> { ... }
}

A Context carries a deadline, a cancelation Future, and other values across API boundaries.

Provided Methods

Returns the time when work done on behalf of this context should be canceled. Successive calls to deadline return the same result.

Returns the value associated with this context for the expected type.

Context values should only be used for request-scoped data that transists processes and API boundaries and not for passing optional parameters to functions.

Implementors