pub struct StateRef<'a, S>(/* private fields */);Expand description
A reference to the current state, returned by State::get_ref.
It wraps a RwLockReadGuard and can be used to avoid cloning the state.
Trait Implementations§
Auto Trait Implementations§
impl<'a, S> Freeze for StateRef<'a, S>
impl<'a, S> !RefUnwindSafe for StateRef<'a, S>
impl<'a, S> !Send for StateRef<'a, S>
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>
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