Enum rkyv::ser::serializers::FixedSizeScratchError
source · [−]pub enum FixedSizeScratchError {
OutOfScratch(Layout),
NotPoppedInReverseOrder {
pos: usize,
next_pos: usize,
next_size: usize,
},
UnownedAllocation,
}
Expand description
Errors that can occur when using a fixed-size allocator.
Pairing a fixed-size allocator with a fallback allocator can help prevent running out of scratch space unexpectedly.
Variants
OutOfScratch(Layout)
The allocator ran out of scratch space.
NotPoppedInReverseOrder
Fields
pos: usize
The current position of the start of free memory
next_pos: usize
The next position according to the erroneous pop
next_size: usize
The size of the memory according to the erroneous pop
Scratch space was not popped in reverse order.
UnownedAllocation
The given allocation did not belong to the scratch allocator.
Trait Implementations
sourceimpl Debug for FixedSizeScratchError
impl Debug for FixedSizeScratchError
sourceimpl Display for FixedSizeScratchError
impl Display for FixedSizeScratchError
sourceimpl Error for FixedSizeScratchError
impl Error for FixedSizeScratchError
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
sourcefn backtrace(&self) -> Option<&Backtrace>
fn backtrace(&self) -> Option<&Backtrace>
backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for FixedSizeScratchError
impl Send for FixedSizeScratchError
impl Sync for FixedSizeScratchError
impl Unpin for FixedSizeScratchError
impl UnwindSafe for FixedSizeScratchError
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