pub struct CArc<T: 'static> { /* private fields */ }
Expand description
Reference-counting pointer based on Arc<RwLock<T>>
with methods for access wrapped data from asynchronous code
Implementations§
Source§impl<T: 'static> CArc<T>
impl<T: 'static> CArc<T>
pub fn async_call<R, F: FnOnce(&T) -> R>(&self, f: F) -> impl Future<Output = R>
pub fn async_call_mut<R, F: FnOnce(&mut T) -> R>( &self, f: F, ) -> impl Future<Output = R>
pub fn call<R, F: FnOnce(&T) -> R>(&self, f: F) -> R
pub fn call_mut<R, F: FnOnce(&mut T) -> R>(&self, f: F) -> R
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for CArc<T>
impl<T> RefUnwindSafe for CArc<T>
impl<T> Send for CArc<T>
impl<T> Sync for CArc<T>
impl<T> Unpin for CArc<T>
impl<T> UnwindSafe for CArc<T>
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