Struct wakflo_common::utils::vault::Vault
source · pub struct Vault<U> { /* private fields */ }Expand description
A Lock-Free and Thread-Safe reference-counting data container
Implementations§
source§impl<U> Vault<U>
impl<U> Vault<U>
pub fn new(d: U) -> Self
pub fn take(&mut self) -> Uwhere U: Default,
pub fn replace(&mut self, src: U) -> U
pub fn swap(&mut self, dst: &mut U)
pub fn map<R, F>(&mut self, f: F) -> Rwhere F: FnMut(&mut U) -> R,
pub fn as_mut(&mut self) -> Vaulted<'_, U>
pub fn as_vault_ref(&self) -> &U
Trait Implementations§
impl<U> Send for Vault<U>
impl<U> Sync for Vault<U>
Auto Trait Implementations§
impl<U> RefUnwindSafe for Vault<U>where U: RefUnwindSafe,
impl<U> Unpin for Vault<U>
impl<U> UnwindSafe for Vault<U>where U: 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