Struct aligned_buffer_pool::Serializer
source · pub struct Serializer<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> { /* private fields */ }
Implementations§
source§impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Serializer<P, ALIGNMENT>
impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Serializer<P, ALIGNMENT>
pub fn into_buffer(self) -> UniqueAlignedBuffer<ALIGNMENT>
pub fn serialize<T: Serialize<Strategy<Self, BoxedError>>>( &mut self, value: &T ) -> Result<(), BoxedError>
Trait Implementations§
source§impl<E: Error, P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Allocator<E> for Serializer<P, ALIGNMENT>
impl<E: Error, P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Allocator<E> for Serializer<P, ALIGNMENT>
source§impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Drop for Serializer<P, ALIGNMENT>
impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Drop for Serializer<P, ALIGNMENT>
source§fn from(serializer: Serializer<P, ALIGNMENT>) -> Self
fn from(serializer: Serializer<P, ALIGNMENT>) -> Self
Converts to this type from the input type.
source§impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> From<Serializer<P, ALIGNMENT>> for UniqueAlignedBuffer<ALIGNMENT>
impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> From<Serializer<P, ALIGNMENT>> for UniqueAlignedBuffer<ALIGNMENT>
source§fn from(serializer: Serializer<P, ALIGNMENT>) -> Self
fn from(serializer: Serializer<P, ALIGNMENT>) -> Self
Converts to this type from the input type.
source§impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Positional for Serializer<P, ALIGNMENT>
impl<P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Positional for Serializer<P, ALIGNMENT>
source§impl<E: Error, P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Sharing<E> for Serializer<P, ALIGNMENT>
impl<E: Error, P: BufferRetentionPolicy<ALIGNMENT>, const ALIGNMENT: usize> Sharing<E> for Serializer<P, ALIGNMENT>
Gets the position of a serialized shared pointer by address. Read more
Adds the serialized position of a shared pointer.
Auto Trait Implementations§
impl<P, const ALIGNMENT: usize> RefUnwindSafe for Serializer<P, ALIGNMENT>where
P: RefUnwindSafe,
impl<P, const ALIGNMENT: usize> Send for Serializer<P, ALIGNMENT>where
P: Sync,
impl<P, const ALIGNMENT: usize> Sync for Serializer<P, ALIGNMENT>where
P: Sync,
impl<P, const ALIGNMENT: usize> Unpin for Serializer<P, ALIGNMENT>
impl<P, const ALIGNMENT: usize> UnwindSafe for Serializer<P, ALIGNMENT>where
P: RefUnwindSafe,
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.
source§impl<S, E> SharingExt<E> for S
impl<S, E> SharingExt<E> for S
Gets the position of a previously-added shared value. Read more
Adds the position of a shared value to the registry.
Archives the given shared value and returns its position. If the value
has already been added then it returns the position of the
previously added value.
source§impl<T, E> WriterExt<E> for T
impl<T, E> WriterExt<E> for T
source§fn pad(&mut self, padding: usize) -> Result<(), E>
fn pad(&mut self, padding: usize) -> Result<(), E>
Advances the given number of bytes as padding.
source§fn align(&mut self, align: usize) -> Result<usize, E>
fn align(&mut self, align: usize) -> Result<usize, E>
Aligns the position of the serializer to the given alignment.
source§fn align_for<T>(&mut self) -> Result<usize, E>
fn align_for<T>(&mut self) -> Result<usize, E>
Aligns the position of the serializer to be suitable to write the given
type.
source§unsafe fn resolve_aligned<T>(
&mut self,
value: &T,
resolver: <T as Archive>::Resolver
) -> Result<usize, E>
unsafe fn resolve_aligned<T>( &mut self, value: &T, resolver: <T as Archive>::Resolver ) -> Result<usize, E>
Resolves the given value with its resolver and writes the archived type. Read more
source§unsafe fn resolve_unsized_aligned<T>(
&mut self,
value: &T,
to: usize
) -> Result<usize, E>where
T: ArchiveUnsized + ?Sized,
unsafe fn resolve_unsized_aligned<T>(
&mut self,
value: &T,
to: usize
) -> Result<usize, E>where
T: ArchiveUnsized + ?Sized,
Resolves the given reference with its resolver and writes the archived
reference. Read more