pub struct Arc<T>(/* private fields */);Expand description
A reference-counted pointer to a value of type T stored in an ArcPool.
Does not support weak references.
Implementations§
Source§impl<T> Arc<T>
impl<T> Arc<T>
pub fn get_mut(this: &mut Self) -> Option<&mut T>
pub fn into_inner(Self: Self) -> Option<T>
pub fn try_unwrap(Self: Self) -> Result<T, Self>
pub fn into_index(this: Self) -> ArcIndex<T>
pub fn ptr_eq(this: &Self, other: &Self) -> bool
Sourcepub unsafe fn from_index(pool: &ArcPool<T>, index: ArcIndex<T>) -> Self
pub unsafe fn from_index(pool: &ArcPool<T>, index: ArcIndex<T>) -> Self
§Safety
Must be the same pool as the one that created the Arc
Sourcepub unsafe fn clone_from_index(pool: &ArcPool<T>, index: &ArcIndex<T>) -> Self
pub unsafe fn clone_from_index(pool: &ArcPool<T>, index: &ArcIndex<T>) -> Self
§Safety
Must be the same pool as the one that created the Arc
pub fn ref_count(this: &Self) -> usize
Trait Implementations§
Source§impl<T: Ord> Ord for Arc<T>
impl<T: Ord> Ord for Arc<T>
Source§impl<T: PartialOrd> PartialOrd for Arc<T>
impl<T: PartialOrd> PartialOrd for Arc<T>
impl<T: Eq> Eq for Arc<T>
Auto Trait Implementations§
impl<T> Freeze for Arc<T>
impl<T> !RefUnwindSafe for Arc<T>
impl<T> Send for Arc<T>
impl<T> Sync for Arc<T>
impl<T> Unpin for Arc<T>
impl<T> !UnwindSafe for Arc<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