#futures #context #api #type #ctx

ctx

Context defines a type, which carries deadlines, cancelation, and other request-scoped values across API boundaries and between processes

4 releases

Uses old Rust 2015

0.2.0 Apr 9, 2017
0.1.2 Apr 7, 2017
0.1.1 Apr 7, 2017
0.1.0 Apr 7, 2017

MIT license

17KB
390 lines

ctx

Build Status Crates.io

Documentation

Ctx defines the Context type, which carries deadlines, cancelation futures, and other request-scoped values across API boundaries and between processes.

It is similar to Go's context package. The main use case is to have incoming requests to a server create a Context. This Context is propagated in the chain of function calls between the incoming request until the outging response. On its way, the Context can be replaced with a derived Context using with_cancel, with_deadline, with_timeout, or with_value.


lib.rs:

Ctx defines the Context type, which carries deadlines, cancelation futures, and other request-scoped values across API boundaries and between processes.

It is similar to Go's context package. The main use case is to have incoming requests to a server create a Context. This Context is propagated in the chain of function calls between the incoming request until the outging response. On its way, the Context can be replaced with a derived Context using with_cancel, with_deadline, with_timeout, or with_value.

Dependencies

~215KB

X