pub struct ArchivedRc<T: ArchivePointee + ?Sized, F> { /* private fields */ }Expand description
An archived Rc.
This is a thin wrapper around a RelPtr to the archived type paired with
a “flavor” type. Because there may be many varieties of shared pointers and
they may not be used together, the flavor helps check that memory is not
being shared incorrectly during validation.
Implementations§
Source§impl<T: ArchivePointee + ?Sized, F> ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> ArchivedRc<T, F>
Sourcepub unsafe fn get_seal_unchecked(this: Seal<'_, Self>) -> Seal<'_, T>
pub unsafe fn get_seal_unchecked(this: Seal<'_, Self>) -> Seal<'_, T>
Gets the sealed value of this ArchivedRc.
§Safety
Any other pointers to the same value must not be dereferenced for the duration of the returned borrow.
Sourcepub fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>(
value: &U,
resolver: RcResolver,
out: Place<Self>,
)
pub fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>( value: &U, resolver: RcResolver, out: Place<Self>, )
Resolves an archived Rc from a given reference.
Sourcepub fn serialize_from_ref<U, S>(
value: &U,
serializer: &mut S,
) -> Result<RcResolver, S::Error>
pub fn serialize_from_ref<U, S>( value: &U, serializer: &mut S, ) -> Result<RcResolver, S::Error>
Serializes an archived Rc from a given reference.
Trait Implementations§
Source§impl<T, F> AsRef<T> for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
impl<T, F> AsRef<T> for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
Source§impl<T, F> Borrow<T> for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
impl<T, F> Borrow<T> for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
Source§impl<T: ArchivePointee + ?Sized, F, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedRc<T, F>where
<__C as Fallible>::Error: Trace,
ArchivedRc<T, F>: Verify<__C>,
RelPtr<T>: CheckBytes<__C>,
PhantomData<F>: CheckBytes<__C>,
impl<T: ArchivePointee + ?Sized, F, __C: Fallible + ?Sized> CheckBytes<__C> for ArchivedRc<T, F>where
<__C as Fallible>::Error: Trace,
ArchivedRc<T, F>: Verify<__C>,
RelPtr<T>: CheckBytes<__C>,
PhantomData<F>: CheckBytes<__C>,
Source§impl<T, F> Debug for ArchivedRc<T, F>
impl<T, F> Debug for ArchivedRc<T, F>
Source§impl<T, F> Deref for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
impl<T, F> Deref for ArchivedRc<T, F>where
T: ArchivePointee + ?Sized,
Source§impl<T, D> Deserialize<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + ?Sized + '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<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + ?Sized + '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<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + ?Sized + '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<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor>where
T: ArchiveUnsized + LayoutRaw + Pointee + ?Sized + '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> Display for ArchivedRc<T, F>
impl<T, F> Display for ArchivedRc<T, F>
Source§impl<T, F> Hash for ArchivedRc<T, F>
impl<T, F> Hash for ArchivedRc<T, F>
Source§impl<T, F> Ord for ArchivedRc<T, F>
impl<T, F> Ord for ArchivedRc<T, F>
Source§impl<T, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor>
Available on target_has_atomic=ptr and crate feature alloc only.
impl<T, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor>
Available on
target_has_atomic=ptr and crate feature alloc only.Source§impl<T, TF, U, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF>
impl<T, TF, U, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF>
Source§impl<T, U> PartialEq<Rc<U>> for ArchivedRc<T, RcFlavor>
Available on crate feature alloc only.
impl<T, U> PartialEq<Rc<U>> for ArchivedRc<T, RcFlavor>
Available on crate feature
alloc only.Source§impl<T, TF, U, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF>
impl<T, TF, U, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF>
Source§impl<T, F> Pointer for ArchivedRc<T, F>
impl<T, F> Pointer for ArchivedRc<T, F>
Source§impl<T, F, C> Verify<C> for ArchivedRc<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 ArchivedRc<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> Eq for ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> Portable for ArchivedRc<T, F>
Auto Trait Implementations§
impl<T, F> Freeze for ArchivedRc<T, F>
impl<T, F> RefUnwindSafe for ArchivedRc<T, F>where
<T as ArchivePointee>::ArchivedMetadata: RefUnwindSafe,
F: RefUnwindSafe,
T: RefUnwindSafe + ?Sized,
impl<T, F> Send for ArchivedRc<T, F>
impl<T, F> Sync for ArchivedRc<T, F>
impl<T, F> !Unpin for ArchivedRc<T, F>
impl<T, F> UnwindSafe for ArchivedRc<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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.