Struct rkyv::rc::ArchivedRc
source · [−]#[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
sourceimpl<T: ArchivePointee + ?Sized, F> ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> ArchivedRc<T, F>
sourcepub unsafe fn get_pin_mut_unchecked(self: Pin<&mut Self>) -> Pin<&mut T>
pub unsafe fn get_pin_mut_unchecked(self: Pin<&mut Self>) -> Pin<&mut T>
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.
sourcepub 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
pos
must be the position ofout
within the archiveresolver
must be the result of serializingvalue
sourcepub 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
sourceimpl<T: ArchivePointee + ?Sized, F> AsRef<T> for ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> AsRef<T> for ArchivedRc<T, F>
sourceimpl<T: ArchivePointee + ?Sized, F> Borrow<T> for ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> Borrow<T> for ArchivedRc<T, F>
sourceimpl<T: ArchivePointee + Debug + ?Sized, F> Debug for ArchivedRc<T, F>
impl<T: ArchivePointee + Debug + ?Sized, F> Debug for ArchivedRc<T, F>
sourceimpl<T: ArchivePointee + ?Sized, F> Deref for ArchivedRc<T, F>
impl<T: ArchivePointee + ?Sized, F> Deref for ArchivedRc<T, F>
sourceimpl<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>,
sourceimpl<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,
sourceimpl<T: ArchivePointee + Display + ?Sized, F> Display for ArchivedRc<T, F>
impl<T: ArchivePointee + Display + ?Sized, F> Display for ArchivedRc<T, F>
sourceimpl<T: ArchivePointee + Hash + ?Sized, F> Hash for ArchivedRc<T, F>
impl<T: ArchivePointee + Hash + ?Sized, F> Hash for ArchivedRc<T, F>
sourceimpl<T: ArchivePointee + Ord + ?Sized, F> Ord for ArchivedRc<T, F>
impl<T: ArchivePointee + Ord + ?Sized, F> Ord for ArchivedRc<T, F>
sourceimpl<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,
sourceimpl<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,
sourceimpl<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>
sourceimpl<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,
sourcefn partial_cmp(&self, other: &ArchivedRc<U, UF>) -> Option<Ordering>
fn partial_cmp(&self, other: &ArchivedRc<U, UF>) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
sourceimpl<T, F> Pointer for ArchivedRc<T, F>
impl<T, F> Pointer for ArchivedRc<T, F>
impl<T: ArchivePointee + Eq + ?Sized, F> Eq for ArchivedRc<T, F>
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
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more