Struct cstree::Arc[][src]

#[repr(C)]pub struct Arc<T: ?Sized + 'static> { /* fields omitted */ }

Implementations

impl<T> Arc<T>[src]

pub fn new(data: T) -> Self[src]

pub fn into_raw(this: Self) -> *const T[src]

pub unsafe fn from_raw(ptr: *const T) -> Self[src]

pub fn borrow_arc<'a>(&'a self) -> ArcBorrow<'a, T>[src]

Produce a pointer to the data that can be converted back to an arc

pub fn with_raw_offset_arc<F, U>(&self, f: F) -> U where
    F: FnOnce(&RawOffsetArc<T>) -> U, 
[src]

Temporarily converts |self| into a bonafide RawOffsetArc and exposes it to the provided callback. The refcount is not modified.

pub fn heap_ptr(&self) -> *const c_void[src]

Returns the address on the heap of the Arc itself -- not the T within it -- for memory reporting.

impl<T: ?Sized> Arc<T>[src]

pub fn ptr_eq(this: &Self, other: &Self) -> bool[src]

impl<T: Clone> Arc<T>[src]

pub fn make_mut(this: &mut Self) -> &mut T[src]

impl<T: ?Sized> Arc<T>[src]

pub fn get_mut(this: &mut Self) -> Option<&mut T>[src]

pub fn is_unique(&self) -> bool[src]

impl<H, T> Arc<HeaderSlice<H, [T]>>[src]

pub fn from_header_and_iter<I>(header: H, items: I) -> Self where
    I: Iterator<Item = T> + ExactSizeIterator
[src]

Creates an Arc for a HeaderSlice using the given header struct and iterator to generate the slice. The resulting Arc will be fat.

impl<H: 'static, T: 'static> Arc<HeaderSlice<HeaderWithLength<H>, [T]>>[src]

pub fn into_thin(a: Self) -> ThinArc<H, T>[src]

Converts an Arc into a ThinArc. This consumes the Arc, so the refcount is not modified.

pub fn from_thin(a: ThinArc<H, T>) -> Self[src]

Converts a ThinArc into an Arc. This consumes the ThinArc, so the refcount is not modified.

impl<T: 'static> Arc<T>[src]

pub fn into_raw_offset(a: Self) -> RawOffsetArc<T>[src]

Converts an Arc into a RawOffsetArc. This consumes the Arc, so the refcount is not modified.

pub fn from_raw_offset(a: RawOffsetArc<T>) -> Self[src]

Converts a RawOffsetArc into an Arc. This consumes the RawOffsetArc, so the refcount is not modified.

Trait Implementations

impl<T: ?Sized> AsRef<T> for Arc<T>[src]

impl<T: ?Sized> Borrow<T> for Arc<T>[src]

impl<T: ?Sized> Clone for Arc<T>[src]

impl<T: ?Sized> CloneStableDeref for Arc<T>[src]

impl<T: ?Sized + Debug> Debug for Arc<T>[src]

impl<T: Default> Default for Arc<T>[src]

impl<T: ?Sized> Deref for Arc<T>[src]

type Target = T

The resulting type after dereferencing.

impl<'de, T: Deserialize<'de>> Deserialize<'de> for Arc<T>[src]

impl<T: ?Sized + Display> Display for Arc<T>[src]

impl<T: ?Sized> Drop for Arc<T>[src]

impl<T: ?Sized + Eq> Eq for Arc<T>[src]

impl<T> From<T> for Arc<T>[src]

impl<T: ?Sized + Hash> Hash for Arc<T>[src]

impl<T: ?Sized + Ord> Ord for Arc<T>[src]

impl<T: ?Sized + PartialEq> PartialEq<Arc<T>> for Arc<T>[src]

impl<T: ?Sized + PartialOrd> PartialOrd<Arc<T>> for Arc<T>[src]

impl<T: ?Sized> Pointer for Arc<T>[src]

impl<T: ?Sized + Sync + Send> Send for Arc<T>[src]

impl<T: Serialize> Serialize for Arc<T>[src]

impl<T: ?Sized> StableDeref for Arc<T>[src]

impl<T: ?Sized + Sync + Send> Sync for Arc<T>[src]

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for Arc<T> where
    T: RefUnwindSafe
[src]

impl<T: ?Sized> Unpin for Arc<T>[src]

impl<T: ?Sized> UnwindSafe for Arc<T> where
    T: RefUnwindSafe
[src]

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CallHasher for T where
    T: Hash

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<!> for T[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.