Struct rkyv::ser::serializers::AlignedSerializer [−][src]
pub struct AlignedSerializer<A> { /* fields omitted */ }
Expand description
A serializer made specifically to work with AlignedVec
.
This serializer makes it easier for the compiler to perform emplacement optimizations and may
give better performance than a basic WriteSerializer
.
Implementations
Consumes the serializer and returns the underlying type.
Trait Implementations
type Error = Infallible
type Error = Infallible
The error produced by any failing methods.
Attempts to write the given bytes to the serializer.
Resolves the given value with its resolver and writes the archived type. Read more
unsafe fn resolve_unsized_aligned<T: ArchiveUnsized + ?Sized>(
&mut self,
value: &T,
to: usize,
metadata_resolver: T::MetadataResolver
) -> Result<usize, Self::Error>
unsafe fn resolve_unsized_aligned<T: ArchiveUnsized + ?Sized>(
&mut self,
value: &T,
to: usize,
metadata_resolver: T::MetadataResolver
) -> Result<usize, Self::Error>
Resolves the given reference with its resolver and writes the archived reference. Read more
Advances the given number of bytes as padding.
Aligns the position of the serializer to the given alignment.
Aligns the position of the serializer to be suitable to write the given type.
Archives the given object and returns the position it was archived at.
fn serialize_unsized_value<T: SerializeUnsized<Self> + ?Sized>(
&mut self,
value: &T
) -> Result<usize, Self::Error>
fn serialize_unsized_value<T: SerializeUnsized<Self> + ?Sized>(
&mut self,
value: &T
) -> Result<usize, Self::Error>
Archives a reference to the given object and returns the position it was archived at.
Auto Trait Implementations
impl<A> RefUnwindSafe for AlignedSerializer<A> where
A: RefUnwindSafe,
impl<A> Send for AlignedSerializer<A> where
A: Send,
impl<A> Sync for AlignedSerializer<A> where
A: Sync,
impl<A> Unpin for AlignedSerializer<A> where
A: Unpin,
impl<A> UnwindSafe for AlignedSerializer<A> where
A: 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>,