Struct rkyv::ser::serializers::AllocScratch
source · [−]pub struct AllocScratch { /* private fields */ }
Expand description
Scratch space that always uses the global allocator.
This allocator will panic if scratch is popped that it did not allocate. For this reason, it should only ever be used as a fallback allocator.
Implementations
sourceimpl AllocScratch
impl AllocScratch
sourcepub fn with_limit(limit: usize) -> Self
pub fn with_limit(limit: usize) -> Self
Creates a new scratch allocator with the given allocation limit.
Trait Implementations
sourceimpl Debug for AllocScratch
impl Debug for AllocScratch
sourceimpl Default for AllocScratch
impl Default for AllocScratch
sourceimpl Drop for AllocScratch
impl Drop for AllocScratch
sourceimpl Fallible for AllocScratch
impl Fallible for AllocScratch
type Error = AllocScratchError
type Error = AllocScratchError
The error produced by any failing methods.
sourceimpl ScratchSpace for AllocScratch
impl ScratchSpace for AllocScratch
impl Send for AllocScratch
impl Sync for AllocScratch
Auto Trait Implementations
Blanket Implementations
sourceimpl<T> ArchivePointee for T
impl<T> ArchivePointee for T
type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
sourcefn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
fn pointer_metadata(_: &Self::ArchivedMetadata) -> <Self as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more