Enum rkyv::std_impl::shared::ArchivedRcWeak[][src]

#[repr(u8)]
pub enum ArchivedRcWeak<T: ArchivePointee + ?Sized> {
    None,
    Some(ArchivedRc<T>),
}

An archived rc::Weak.

Variants

None

A null weak pointer

Some(ArchivedRc<T>)

A weak pointer to some shared pointer

Implementations

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

pub fn upgrade(&self) -> Option<&ArchivedRc<T>>[src]

Attempts to upgrade the weak pointer to an ArchivedArc.

Returns None if a null weak pointer was serialized.

pub fn upgrade_pin(self: Pin<&mut Self>) -> Option<Pin<&mut ArchivedRc<T>>>[src]

Attempts to upgrade a pinned mutable weak pointer.

Trait Implementations

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

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

The error that may result from checking the type.

Auto Trait Implementations

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

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

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

impl<T> !Unpin for ArchivedRcWeak<T>

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

Blanket Implementations

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

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

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

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

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

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

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.

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.