pub struct ArchivedRcWeak<T: ArchivePointee + ?Sized, F> { /* private fields */ }Expand description
An archived rc::Weak.
This is essentially just an optional ArchivedRc.
Implementations§
Source§impl<T: ArchivePointee + ?Sized, F> ArchivedRcWeak<T, F>
impl<T: ArchivePointee + ?Sized, F> ArchivedRcWeak<T, F>
Sourcepub fn upgrade(&self) -> Option<&ArchivedRc<T, F>>
pub fn upgrade(&self) -> Option<&ArchivedRc<T, F>>
Attempts to upgrade the weak pointer to an ArchivedArc.
Returns None if a null weak pointer was serialized.
Sourcepub fn upgrade_seal(this: Seal<'_, Self>) -> Option<Seal<'_, ArchivedRc<T, F>>>
pub fn upgrade_seal(this: Seal<'_, Self>) -> Option<Seal<'_, ArchivedRc<T, F>>>
Attempts to upgrade a sealed weak pointer.
Sourcepub fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>(
value: Option<&U>,
resolver: RcWeakResolver,
out: Place<Self>,
)
pub fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>( value: Option<&U>, resolver: RcWeakResolver, out: Place<Self>, )
Resolves an archived Weak from a given optional reference.
Trait Implementations§
Source§impl<T: ArchivePointee + ?Sized, F, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedRcWeak<T, F>where
<__C as Fallible>::Error: Trace,
ArchivedRcWeak<T, F>: Verify<__C>,
RelPtr<T>: CheckBytes<__C>,
PhantomData<F>: CheckBytes<__C>,
impl<T: ArchivePointee + ?Sized, F, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedRcWeak<T, F>where
<__C as Fallible>::Error: Trace,
ArchivedRcWeak<T, F>: Verify<__C>,
RelPtr<T>: CheckBytes<__C>,
PhantomData<F>: CheckBytes<__C>,
Source§impl<T: ArchivePointee + Debug + ?Sized, F> Debug for ArchivedRcWeak<T, F>
impl<T: ArchivePointee + Debug + ?Sized, F> Debug for ArchivedRcWeak<T, F>
Source§impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, ArcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + 'static,
T::Archived: DeserializeUnsized<T, D>,
T::Metadata: Into<Metadata> + FromMetadata,
D: Fallible + Pooling + ?Sized,
D::Error: Source,
Available on target_has_atomic=ptr and crate feature alloc only.
impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, ArcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + 'static,
T::Archived: DeserializeUnsized<T, D>,
T::Metadata: Into<Metadata> + FromMetadata,
D: Fallible + Pooling + ?Sized,
D::Error: Source,
Available on
target_has_atomic=ptr and crate feature alloc only.Source§impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, RcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + 'static,
T::Archived: DeserializeUnsized<T, D>,
T::Metadata: Into<Metadata> + FromMetadata,
D: Fallible + Pooling + ?Sized,
D::Error: Source,
Available on crate feature alloc only.
impl<T, D> Deserialize<Weak<T>, D> for ArchivedRcWeak<T::Archived, RcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + 'static,
T::Archived: DeserializeUnsized<T, D>,
T::Metadata: Into<Metadata> + FromMetadata,
D: Fallible + Pooling + ?Sized,
D::Error: Source,
Available on crate feature
alloc only.Source§impl<T, F, C> Verify<C> for ArchivedRcWeak<T, F>where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + ?Sized + 'static,
T::ArchivedMetadata: CheckBytes<C>,
F: Flavor,
C: Fallible + ArchiveContext + SharedContext + ?Sized,
C::Error: Source,
Available on crate feature bytecheck only.
impl<T, F, C> Verify<C> for ArchivedRcWeak<T, F>where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + ?Sized + 'static,
T::ArchivedMetadata: CheckBytes<C>,
F: Flavor,
C: Fallible + ArchiveContext + SharedContext + ?Sized,
C::Error: Source,
Available on crate feature
bytecheck only.impl<T: ArchivePointee + ?Sized, F> Portable for ArchivedRcWeak<T, F>
Auto Trait Implementations§
impl<T, F> Freeze for ArchivedRcWeak<T, F>
impl<T, F> RefUnwindSafe for ArchivedRcWeak<T, F>where
<T as ArchivePointee>::ArchivedMetadata: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
impl<T, F> Send for ArchivedRcWeak<T, F>
impl<T, F> Sync for ArchivedRcWeak<T, F>
impl<T, F> !Unpin for ArchivedRcWeak<T, F>
impl<T, F> UnwindSafe for ArchivedRcWeak<T, F>
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Returns whether the given value has been niched. Read more
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
Writes data to
out indicating that a T is niched.