Struct shio::state::State
[−]
[src]
pub struct State { /* fields omitted */ }
Methods
impl State
[src]
fn put<K: Key>(&mut self, value: K::Value)
[src]
Puts a value into the request state.
fn get<T: FromState>(&self) -> &T::Value
[src]
Gets a value from the request state.
With the nightly
feature enabled, this will fallback to checking the shared
state.
Panics
If there is no value in the request state of the given type.
fn try_get<T: FromState>(&self) -> Option<&T::Value>
[src]
Gets a value from the request state.
[src]
Gets a reference to the shared state.