pub struct State<T: 'static>(pub T);Expand description
Wrapper for cloneable state values injected into the environment.
Tuple Fields§
§0: TTrait Implementations§
impl<T: Eq + 'static> Eq for State<T>
Source§impl<T: 'static + Clone> Extractor for State<T>
impl<T: 'static + Clone> Extractor for State<T>
Source§fn extract(env: &Environment) -> Result<Self, Error>
fn extract(env: &Environment) -> Result<Self, Error>
Attempts to extract an instance of
Self from the given environment. Read moreSource§fn extract_from_action(
env: &Environment,
state: &mut ExtractionState,
) -> Result<Self, Error>
fn extract_from_action( env: &Environment, state: &mut ExtractionState, ) -> Result<Self, Error>
Attempts to extract an instance of
Self from the given environment for
an action handler invocation. Read moreimpl<T: PartialEq + 'static> StructuralPartialEq for State<T>
Auto Trait Implementations§
impl<T> Freeze for State<T>where
T: Freeze,
impl<T> RefUnwindSafe for State<T>where
T: RefUnwindSafe,
impl<T> Send for State<T>where
T: Send,
impl<T> Sync for State<T>where
T: Sync,
impl<T> Unpin for State<T>where
T: Unpin,
impl<T> UnsafeUnpin for State<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for State<T>where
T: UnwindSafe,
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