Struct rkyv::vec::ArchivedVec [−][src]
#[repr(transparent)]pub struct ArchivedVec<T>(_);
Expand description
An archived Vec
.
This uses a RelPtr
to a [T]
under the hood. Unlike
ArchivedString
, it does not have an inline representation.
Implementations
Gets the elements of the archived vec as a pinned mutable slice.
Gets the element at the given index ot this archived vec as a pinned mutable reference.
pub unsafe fn resolve_from_slice<U: Archive<Archived = T>>(
slice: &[U],
pos: usize,
resolver: VecResolver<MetadataResolver<[U]>>,
out: *mut Self
)
pub unsafe fn resolve_from_slice<U: Archive<Archived = T>>(
slice: &[U],
pos: usize,
resolver: VecResolver<MetadataResolver<[U]>>,
out: *mut Self
)
Resolves an archived Vec
from a given slice.
Safety
pos
must be the position ofout
within the archiveresolver
must be the result of serializingvalue
pub fn serialize_from_slice<U: Serialize<S, Archived = T>, S: Serializer + ?Sized>(
slice: &[U],
serializer: &mut S
) -> Result<VecResolver<MetadataResolver<[U]>>, S::Error> where
[U]: SerializeUnsized<S>,
pub fn serialize_from_slice<U: Serialize<S, Archived = T>, S: Serializer + ?Sized>(
slice: &[U],
serializer: &mut S
) -> Result<VecResolver<MetadataResolver<[U]>>, S::Error> where
[U]: SerializeUnsized<S>,
Serializes an archived Vec
from a given slice.
Trait Implementations
impl<T, C: ?Sized> CheckBytes<C> for ArchivedVec<T> where
T: CheckBytes<C>,
C: ArchiveContext,
C::Error: Error,
impl<T, C: ?Sized> CheckBytes<C> for ArchivedVec<T> where
T: CheckBytes<C>,
C: ArchiveContext,
C::Error: Error,
type Error = CheckOwnedPointerError<[T], C>
type Error = CheckOwnedPointerError<[T], C>
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: Archive, D: Fallible + ?Sized> Deserialize<Vec<T, Global>, D> for ArchivedVec<T::Archived> where
[T::Archived]: DeserializeUnsized<[T], D>,
impl<T: Archive, D: Fallible + ?Sized> Deserialize<Vec<T, Global>, D> for ArchivedVec<T::Archived> where
[T::Archived]: DeserializeUnsized<[T], D>,
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
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
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
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
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> RefUnwindSafe for ArchivedVec<T> where
T: RefUnwindSafe,
impl<T> Send for ArchivedVec<T> where
T: Send,
impl<T> Sync for ArchivedVec<T> where
T: Sync,
impl<T> !Unpin for ArchivedVec<T>
impl<T> UnwindSafe for ArchivedVec<T> where
T: 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>,