Struct rkyv::rc::ArchivedRc [−][src]
#[repr(transparent)]pub struct ArchivedRc<T: ArchivePointee + ?Sized, F>(_, _);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
Gets the pinned mutable value of this ArchivedRc.
Safety
Any other ArchivedRc pointers to the same value must not be dereferenced for the duration
of the returned borrow.
pub unsafe fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>(
value: &U,
pos: usize,
resolver: RcResolver<MetadataResolver<U>>,
out: *mut Self
)
pub unsafe fn resolve_from_ref<U: ArchiveUnsized<Archived = T> + ?Sized>(
value: &U,
pos: usize,
resolver: RcResolver<MetadataResolver<U>>,
out: *mut Self
)
Resolves an archived Rc from a given reference.
Safety
posmust be the position ofoutwithin the archiveresolvermust be the result of serializingvalue
pub fn serialize_from_ref<U: SerializeUnsized<S> + ?Sized, S: Serializer + SharedSerializeRegistry + ?Sized>(
value: &U,
serializer: &mut S
) -> Result<RcResolver<MetadataResolver<U>>, S::Error>
pub fn serialize_from_ref<U: SerializeUnsized<S> + ?Sized, S: Serializer + SharedSerializeRegistry + ?Sized>(
value: &U,
serializer: &mut S
) -> Result<RcResolver<MetadataResolver<U>>, S::Error>
Serializes an archived Rc from a given reference.
Trait Implementations
impl<T: ArchiveUnsized + ?Sized + 'static, D: SharedDeserializeRegistry + ?Sized> Deserialize<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor> where
T::Archived: DeserializeUnsized<T, D>,
impl<T: ArchiveUnsized + ?Sized + 'static, D: SharedDeserializeRegistry + ?Sized> Deserialize<Arc<T>, D> for ArchivedRc<T::Archived, ArcFlavor> where
T::Archived: DeserializeUnsized<T, D>,
impl<T, D> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor> where
T: ArchiveUnsized + ?Sized + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry + ?Sized,
impl<T, D> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor> where
T: ArchiveUnsized + ?Sized + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry + ?Sized,
impl<T, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor> where
T: ArchivePointee + PartialEq<U> + ?Sized,
U: ?Sized,
impl<T, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor> where
T: ArchivePointee + PartialEq<U> + ?Sized,
U: ?Sized,
impl<T, TF, U, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialEq<U> + ?Sized,
U: ArchivePointee + ?Sized,
impl<T, TF, U, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialEq<U> + ?Sized,
U: ArchivePointee + ?Sized,
impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ?Sized> PartialEq<Rc<U>> for ArchivedRc<T, RcFlavor>
impl<T: ArchivePointee + PartialEq<U> + ?Sized, U: ?Sized> PartialEq<Rc<U>> for ArchivedRc<T, RcFlavor>
impl<T, TF, U, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialOrd<U> + ?Sized,
U: ArchivePointee + ?Sized,
impl<T, TF, U, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialOrd<U> + ?Sized,
U: ArchivePointee + ?Sized,
This method returns an ordering between self and other values if one exists. Read more
This method tests less than (for self and other) and is used by the < operator. Read more
This method tests less than or equal to (for self and other) and is used by the <=
operator. Read more
This method tests greater than (for self and other) and is used by the > operator. Read more
Auto Trait Implementations
impl<T: ?Sized, F> RefUnwindSafe for ArchivedRc<T, F> where
F: RefUnwindSafe,
T: RefUnwindSafe,
<T as ArchivePointee>::ArchivedMetadata: RefUnwindSafe,
impl<T: ?Sized, F> Send for ArchivedRc<T, F> where
F: Send,
T: Send,
<T as ArchivePointee>::ArchivedMetadata: Send,
impl<T: ?Sized, F> Sync for ArchivedRc<T, F> where
F: Sync,
T: Sync,
<T as ArchivePointee>::ArchivedMetadata: Sync,
impl<T, F> !Unpin for ArchivedRc<T, F>
impl<T: ?Sized, F> UnwindSafe for ArchivedRc<T, F> where
F: UnwindSafe,
T: UnwindSafe,
<T as ArchivePointee>::ArchivedMetadata: UnwindSafe,
Blanket Implementations
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Converts some archived metadata to the pointer metadata for itself.
Mutably borrows from an owned value. Read more