pub trait RequestStateExt {
// Required methods
fn get_state(&self, type_id: TypeId) -> Option<&Arc<dyn Any + Send + Sync>>;
fn set_state_map(&mut self, state_map: StateMap);
fn state_map(&self) -> Option<&StateMap>;
}Expand description
Extension trait for Request to handle state
Required Methods§
Sourcefn get_state(&self, type_id: TypeId) -> Option<&Arc<dyn Any + Send + Sync>>
fn get_state(&self, type_id: TypeId) -> Option<&Arc<dyn Any + Send + Sync>>
Get state by TypeId
Sourcefn set_state_map(&mut self, state_map: StateMap)
fn set_state_map(&mut self, state_map: StateMap)
Set the state map for this request
Implementors§
impl RequestStateExt for Request
Implementation of RequestStateExt for Request