Struct rkyv::std_impl::shared::ArchivedArc[][src]

#[repr(transparent)]
pub struct ArchivedArc<T: ArchivePointee + ?Sized>(_);

An archived Arc.

This is a thin wrapper around a RelPtr to the archived type.

Implementations

impl<T: ArchivePointee + ?Sized> ArchivedArc<T>[src]

pub unsafe fn get_pin_unchecked(self: Pin<&mut Self>) -> Pin<&mut T>[src]

Gets the value of this archived Arc.

Safety

The caller must guarantee that any other ArchivedArc pointers to the same value are not dereferenced for the duration of the returned borrow.

Trait Implementations

impl<T: ArchivePointee + CheckBytes<C> + Pointee + ?Sized + 'static, C: ArchiveBoundsContext + SharedArchiveContext + ?Sized> CheckBytes<C> for ArchivedArc<T> where
    T::ArchivedMetadata: CheckBytes<C>,
    C::Error: Error,
    <T as Pointee>::Metadata: LayoutMetadata<T>, 
[src]

type Error = SharedPointerError<<T::ArchivedMetadata as CheckBytes<C>>::Error, T::Error, C::Error>

The error that may result from checking the type.

unsafe fn check_bytes<'a>(
    value: *const Self,
    context: &mut C
) -> Result<&'a Self, Self::Error>
[src]

Checks whether the given pointer points to a valid value within the given context. Read more

impl<T: ArchivePointee + ?Sized> Deref for ArchivedArc<T>[src]

type Target = T

The resulting type after dereferencing.

fn deref(&self) -> &Self::Target[src]

Dereferences the value.

impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ?Sized> PartialEq<Arc<U>> for ArchivedArc<T>[src]

fn eq(&self, other: &Arc<U>) -> bool[src]

This method tests for self and other values to be equal, and is used by ==. Read more

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0[src]

This method tests for !=.

Auto Trait Implementations

impl<T: ?Sized> RefUnwindSafe for ArchivedArc<T> where
    T: RefUnwindSafe,
    <T as ArchivePointee>::ArchivedMetadata: RefUnwindSafe

impl<T: ?Sized> Send for ArchivedArc<T> where
    T: Send,
    <T as ArchivePointee>::ArchivedMetadata: Send

impl<T: ?Sized> Sync for ArchivedArc<T> where
    T: Sync,
    <T as ArchivePointee>::ArchivedMetadata: Sync

impl<T> !Unpin for ArchivedArc<T>

impl<T: ?Sized> UnwindSafe for ArchivedArc<T> where
    T: UnwindSafe,
    <T as ArchivePointee>::ArchivedMetadata: UnwindSafe

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

pub fn pointer_metadata(
    &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
[src]

Converts some archived metadata to the pointer metadata for itself.

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

impl<T> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.