Struct arc_swap::Guard [−][src]
pub struct Guard<'l, T: RefCnt> { /* fields omitted */ }
Expand description
A temporary storage of the pointer.
This guard object is returned from most loading methods (with the notable exception of
load_full
). It dereferences to the smart pointer
loaded, so most operations are to be done using that.
Implementations
impl<'a, T: RefCnt> Guard<'a, T>
[src]
impl<'a, T: RefCnt> Guard<'a, T>
[src]pub fn into_inner(lease: Self) -> T
[src]
pub fn into_inner(lease: Self) -> T
[src]Converts it into the held value.
This, on occasion, may be a tiny bit faster than cloning the Arc or whatever is being held inside.
Trait Implementations
Auto Trait Implementations
impl<'l, T> RefUnwindSafe for Guard<'l, T> where
T: RefUnwindSafe,
T: RefUnwindSafe,
impl<'l, T> Send for Guard<'l, T> where
T: Send,
T: Send,
impl<'l, T> Sync for Guard<'l, T> where
T: Sync,
T: Sync,
impl<'l, T> Unpin for Guard<'l, T> where
T: Unpin,
T: Unpin,
impl<'l, T> UnwindSafe for Guard<'l, T> where
T: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src]
impl<T, A> DynAccess<T> for A where
A: Access<T>,
<A as Access<T>>::Guard: 'static,
[src]pub fn load(&Self) -> DynGuard<T>
[src]
pub fn load(&Self) -> DynGuard<T>
[src]The equivalent of Access::load
.