pub struct AsyncShared<T> { /* private fields */ }
Implementations§
pub fn new(data: T) -> Self
pub fn try_consume(self) -> Result<T, Self>
pub fn read(&self) -> Option<RwLockReadGuard<'_, T>>
pub fn write(&self) -> Option<RwLockWriteGuard<'_, T>>
pub fn swap(&self, data: T) -> Option<T>
pub fn references_count(&self) -> usize
Trait Implementations§
Source§fn default() -> AsyncShared<T>
fn default() -> AsyncShared<T>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
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