#context #b #api #incoming-requests #passing-optional #context-carries #carries-deadlines #api-boundaries #gos-context #canceled-successive

archived 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

#5 in #carries

Download history 4/week @ 2023-11-02 6/week @ 2023-11-09 1/week @ 2023-11-16 8/week @ 2023-11-23 10/week @ 2023-11-30 5/week @ 2023-12-14 10/week @ 2023-12-21 1/week @ 2023-12-28 5/week @ 2024-01-18 8/week @ 2024-01-25 8/week @ 2024-02-01 11/week @ 2024-02-08 75/week @ 2024-02-15

102 downloads per month

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

~225KB