pub struct Armc<T> { /* private fields */ }
Implementations
sourceimpl<T> Armc<T>
impl<T> Armc<T>
pub fn new(data: T) -> Self
sourcepub fn lock(&self) -> ArmcGuard<'_, T>
pub fn lock(&self) -> ArmcGuard<'_, T>
Returns a token([ArmcGuard<’_,T>]) for data to be securely modified.
Examples
use armc::Armc;
let armc = Armc::new(5);
assert_eq!(*armc.lock(),5);
Trait Implementations
Auto Trait Implementations
impl<T> !RefUnwindSafe for Armc<T>
impl<T> Send for Armc<T>where
T: Send,
impl<T> Sync for Armc<T>where
T: Send,
impl<T> Unpin for Armc<T>
impl<T> !UnwindSafe for Armc<T>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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