Struct rkyv::ser::serializers::ScratchTracker [−][src]
pub struct ScratchTracker<T> { /* fields omitted */ }Expand description
A passthrough scratch space allocator that tracks scratch space usage.
Implementations
Returns the maximum number of bytes that were concurrently allocated during serialization.
Returns the maximum number of concurrent allocations during serialization.
Returns the maximum alignment of scratch space requested during serialization.
Returns the minimum buffer size required to serialize the same data.
This calculation takes into account packing efficiency for slab allocated scratch space. It
is not exact, and has an error bound of max_allocations * (max_alignment - 1) bytes. This
should be suitably small for most use cases.
Returns the maximum error term for the minimum buffer size calculation.
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for ScratchTracker<T> where
T: RefUnwindSafe,
impl<T> Send for ScratchTracker<T> where
T: Send,
impl<T> Sync for ScratchTracker<T> where
T: Sync,
impl<T> Unpin for ScratchTracker<T> where
T: Unpin,
impl<T> UnwindSafe for ScratchTracker<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