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
Scratch space was not popped in reverse order.
Fields
UnownedAllocation
The given allocation did not belong to the scratch allocator.
Trait Implementations§
source§impl Debug for FixedSizeScratchError
impl Debug for FixedSizeScratchError
source§impl Display for FixedSizeScratchError
impl Display for FixedSizeScratchError
source§impl Error for FixedSizeScratchError
impl Error for FixedSizeScratchError
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl Freeze for FixedSizeScratchError
impl RefUnwindSafe for FixedSizeScratchError
impl Send for FixedSizeScratchError
impl Sync for FixedSizeScratchError
impl Unpin for FixedSizeScratchError
impl UnwindSafe for FixedSizeScratchError
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