[−][src]Function rusty_express::prelude::ServerContext::update_context
pub fn update_context(
req: &Box<Request>,
resp: &mut Box<Response>
) -> Result<(), &'static str>
Update the context content. This will invoke the RwLock
to gain the exclusive access
to the underlying context object, hence impacting the performance. You don't need to lock
the object again, unless it's also shared with other threads not interacting with the TCP
stream.
For examples, see [https://github.com/Chopinsky/Rusty_Express/blob/master/examples/use_router.rs
]