Struct aligned_buffer_pool::SerializerPool
source · pub struct SerializerPool<P: BufferRetentionPolicy, const ALIGNMENT: usize, A = Global>{ /* private fields */ }
Implementations§
source§impl<P: BufferRetentionPolicy, const ALIGNMENT: usize> SerializerPool<P, ALIGNMENT>
impl<P: BufferRetentionPolicy, const ALIGNMENT: usize> SerializerPool<P, ALIGNMENT>
source§impl<P: BufferRetentionPolicy, const ALIGNMENT: usize, A> SerializerPool<P, ALIGNMENT, A>
impl<P: BufferRetentionPolicy, const ALIGNMENT: usize, A> SerializerPool<P, ALIGNMENT, A>
pub fn new_in(policy: P, capacity: usize, alloc: A) -> Self
pub fn get(&self) -> Serializer<P, ALIGNMENT, A>
pub fn serialize<T: Serialize<Strategy<Serializer<P, ALIGNMENT, A>, BoxedError>>>( &self, value: &T ) -> Result<SerializerAlignedBuffer<ALIGNMENT, P, A>, BoxedError>
source§impl<P, const ALIGNMENT: usize> SerializerPool<P, ALIGNMENT>where
P: Default + BufferRetentionPolicy,
impl<P, const ALIGNMENT: usize> SerializerPool<P, ALIGNMENT>where
P: Default + BufferRetentionPolicy,
pub fn with_capacity(capacity: usize) -> Self
Auto Trait Implementations§
impl<P, const ALIGNMENT: usize, A> RefUnwindSafe for SerializerPool<P, ALIGNMENT, A>where
A: RefUnwindSafe,
P: RefUnwindSafe,
impl<P, const ALIGNMENT: usize, A> Send for SerializerPool<P, ALIGNMENT, A>
impl<P, const ALIGNMENT: usize, A> Sync for SerializerPool<P, ALIGNMENT, A>
impl<P, const ALIGNMENT: usize, A> Unpin for SerializerPool<P, ALIGNMENT, A>
impl<P, const ALIGNMENT: usize, A> UnwindSafe for SerializerPool<P, ALIGNMENT, A>where
A: RefUnwindSafe,
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.