Struct concordium_std::StateRef
source · [−]pub struct StateRef<'a, V> { /* private fields */ }
Expand description
The StateRef
behaves akin the type &'a V
, except that it is not
copyable. It should be used as MutexGuard or
similar types which guard access to a resource.
The type implements Deref
to V
, and that is the
intended, and only, way to use it.
Trait Implementations
Auto Trait Implementations
impl<'a, V> RefUnwindSafe for StateRef<'a, V> where
V: RefUnwindSafe,
impl<'a, V> Send for StateRef<'a, V> where
V: Send + Sync,
impl<'a, V> Sync for StateRef<'a, V> where
V: Sync,
impl<'a, V> Unpin for StateRef<'a, V> where
V: Unpin,
impl<'a, V> UnwindSafe for StateRef<'a, V> where
V: UnwindSafe + RefUnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more