pub struct Context { /* private fields */ }
Expand description
Context allows passing information between twirp rpc handlers and http middleware by providing
access to extensions on the http::Request
and http::Response
.
An example use case is to extract a request id from an http header and use that id in subsequent handler code.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl !RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl !UnwindSafe for Context
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more