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§
source§impl 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§
source§impl Debug for AllocScratch
impl Debug for AllocScratch
source§impl Default for AllocScratch
impl Default for AllocScratch
source§impl Drop for AllocScratch
impl Drop for AllocScratch
source§impl Fallible for AllocScratch
impl Fallible for AllocScratch
§type Error = AllocScratchError
type Error = AllocScratchError
The error produced by any failing methods.
source§impl ScratchSpace for AllocScratch
impl ScratchSpace for AllocScratch
impl Send for AllocScratch
impl Sync for AllocScratch
Auto Trait Implementations§
impl Freeze for AllocScratch
impl RefUnwindSafe for AllocScratch
impl Unpin for AllocScratch
impl UnwindSafe for AllocScratch
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