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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)