pub struct StateRef<'a, S>(pub &'a S);Expand description
App state extractor. S type must be the same with the type passed to App::with_xxx_state(S).
Tuple Fields§
§0: &'a STrait Implementations§
source§impl<'a, 'r, C, B, T> FromRequest<'a, WebContext<'r, C, B>> for StateRef<'a, T>where
C: Borrow<T>,
B: BodyStream,
T: 'static,
impl<'a, 'r, C, B, T> FromRequest<'a, WebContext<'r, C, B>> for StateRef<'a, T>where
C: Borrow<T>,
B: BodyStream,
T: 'static,
Auto Trait Implementations§
impl<'a, S> RefUnwindSafe for StateRef<'a, S>where
S: RefUnwindSafe,
impl<'a, S> Send for StateRef<'a, S>where
S: Sync,
impl<'a, S> Sync for StateRef<'a, S>where
S: Sync,
impl<'a, S> Unpin for StateRef<'a, S>
impl<'a, S> UnwindSafe for StateRef<'a, S>where
S: RefUnwindSafe,
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