#[repr(C)]pub struct Arc<T: ?Sized + 'static> { /* private fields */ }
Implementations§
source§impl<T> Arc<T>
impl<T> Arc<T>
pub fn new(data: T) -> Self
pub fn into_raw(this: Self) -> *const T
sourcepub fn borrow_arc<'a>(&'a self) -> ArcBorrow<'a, T>
pub fn borrow_arc<'a>(&'a self) -> ArcBorrow<'a, T>
Produce a pointer to the data that can be converted back to an arc
sourcepub fn with_raw_offset_arc<F, U>(&self, f: F) -> Uwhere
F: FnOnce(&RawOffsetArc<T>) -> U,
pub fn with_raw_offset_arc<F, U>(&self, f: F) -> Uwhere
F: FnOnce(&RawOffsetArc<T>) -> U,
Temporarily converts |self| into a bonafide RawOffsetArc and exposes it to the provided callback. The refcount is not modified.
source§impl<H, T> Arc<HeaderSlice<H, [T]>>
impl<H, T> Arc<HeaderSlice<H, [T]>>
sourcepub fn from_header_and_iter<I>(header: H, items: I) -> Selfwhere
I: Iterator<Item = T> + ExactSizeIterator,
pub fn from_header_and_iter<I>(header: H, items: I) -> Selfwhere
I: Iterator<Item = T> + ExactSizeIterator,
Creates an Arc for a HeaderSlice using the given header struct and iterator to generate the slice. The resulting Arc will be fat.
source§impl<H: 'static, T: 'static> Arc<HeaderSlice<HeaderWithLength<H>, [T]>>
impl<H: 'static, T: 'static> Arc<HeaderSlice<HeaderWithLength<H>, [T]>>
source§impl<T: 'static> Arc<T>
impl<T: 'static> Arc<T>
sourcepub fn into_raw_offset(a: Self) -> RawOffsetArc<T>
pub fn into_raw_offset(a: Self) -> RawOffsetArc<T>
Converts an Arc into a RawOffsetArc. This consumes the Arc, so the refcount is not modified.
sourcepub fn from_raw_offset(a: RawOffsetArc<T>) -> Self
pub fn from_raw_offset(a: RawOffsetArc<T>) -> Self
Converts a RawOffsetArc into an Arc. This consumes the RawOffsetArc, so the refcount is not modified.
Trait Implementations§
source§impl<T: ?Sized + Ord> Ord for Arc<T>
impl<T: ?Sized + Ord> Ord for Arc<T>
source§impl<T: ?Sized + PartialOrd> PartialOrd for Arc<T>
impl<T: ?Sized + PartialOrd> PartialOrd for Arc<T>
impl<T: ?Sized> CloneStableDeref for Arc<T>
impl<T: ?Sized + Eq> Eq for Arc<T>
impl<T: ?Sized + Sync + Send> Send for Arc<T>
impl<T: ?Sized> StableDeref for Arc<T>
impl<T: ?Sized + Sync + Send> Sync for Arc<T>
Auto Trait Implementations§
impl<T> Freeze for Arc<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Arc<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Unpin for Arc<T>where
T: ?Sized,
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
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
)