pub struct ArcStruct<T> {
pub data: T,
/* private fields */
}Expand description
Reference counting struct for atomic reference counts.
Fields§
§data: TTrait Implementations§
Source§impl<T> RefCounter<T> for ArcStruct<T>
impl<T> RefCounter<T> for ArcStruct<T>
Source§fn decrement(&self) -> usize
fn decrement(&self) -> usize
Decrements the reference counter by one and returns its current value.
Source§fn increment(&self) -> usize
fn increment(&self) -> usize
Increments the reference counter by one and returns its current value.
Source§fn get_data_mut(&mut self) -> &mut T
fn get_data_mut(&mut self) -> &mut T
Returns a mutable reference to the data associated with this struct.
impl<T> Send for ArcStruct<T>where
T: Send,
impl<T> Sync for ArcStruct<T>where
T: Sync,
Auto Trait Implementations§
impl<T> !Freeze for ArcStruct<T>
impl<T> RefUnwindSafe for ArcStruct<T>where
T: RefUnwindSafe,
impl<T> Unpin for ArcStruct<T>where
T: Unpin,
impl<T> UnwindSafe for ArcStruct<T>where
T: UnwindSafe,
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