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.
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
pos
must be the position ofout
within the archiveresolver
must 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: ?Sized, F, C: ?Sized> CheckBytes<C> for ArchivedRc<T, F> where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + Pointee + 'static,
C: ArchiveContext + SharedContext,
T::ArchivedMetadata: CheckBytes<C>,
C::Error: Error,
F: 'static,
impl<T: ?Sized, F, C: ?Sized> CheckBytes<C> for ArchivedRc<T, F> where
T: ArchivePointee + CheckBytes<C> + LayoutRaw + Pointee + 'static,
C: ArchiveContext + SharedContext,
T::ArchivedMetadata: CheckBytes<C>,
C::Error: Error,
F: 'static,
type Error = SharedPointerError<<T::ArchivedMetadata as CheckBytes<C>>::Error, T::Error, C::Error>
type Error = SharedPointerError<<T::ArchivedMetadata as CheckBytes<C>>::Error, T::Error, C::Error>
The error that may result from checking the type.
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
unsafe fn check_bytes<'a>(
value: *const Self,
context: &mut C
) -> Result<&'a Self, Self::Error>
Checks whether the given pointer points to a valid value within the given context. Read more
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: ?Sized, D: ?Sized> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor> where
T: ArchiveUnsized + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry,
impl<T: ?Sized, D: ?Sized> Deserialize<Rc<T>, D> for ArchivedRc<T::Archived, RcFlavor> where
T: ArchiveUnsized + 'static,
T::Archived: DeserializeUnsized<T, D>,
D: SharedDeserializeRegistry,
impl<T: ?Sized, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor> where
T: ArchivePointee + PartialEq<U>,
U: ?Sized,
impl<T: ?Sized, U> PartialEq<Arc<U>> for ArchivedRc<T, ArcFlavor> where
T: ArchivePointee + PartialEq<U>,
U: ?Sized,
impl<T: ?Sized, TF, U: ?Sized, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialEq<U>,
U: ArchivePointee,
impl<T: ?Sized, TF, U: ?Sized, UF> PartialEq<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialEq<U>,
U: ArchivePointee,
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: ?Sized, TF, U: ?Sized, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialOrd<U>,
U: ArchivePointee,
impl<T: ?Sized, TF, U: ?Sized, UF> PartialOrd<ArchivedRc<U, UF>> for ArchivedRc<T, TF> where
T: ArchivePointee + PartialOrd<U>,
U: ArchivePointee,
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
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,
impl<F, W, T, D> Deserialize<With<T, W>, D> for F where
D: Fallible + ?Sized,
F: ?Sized,
W: DeserializeWith<F, T, D>,