Enum rkyv::ser::serializers::FixedSizeScratchError[][src]

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

The allocator ran out of scratch space.

Tuple Fields of OutOfScratch

0: Layout
NotPoppedInReverseOrder

Scratch space was not popped in reverse order.

Fields of NotPoppedInReverseOrder

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

UnownedAllocation

The given allocation did not belong to the scratch allocator.

Trait Implementations

Formats the value using the given formatter. Read more

Formats the value using the given formatter. Read more

The lower-level source of this error, if any. Read more

🔬 This is a nightly-only experimental API. (backtrace)

Returns a stack backtrace, if available, of where this error occurred. Read more

👎 Deprecated since 1.42.0:

use the Display impl or to_string()

👎 Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

The archived version of the pointer metadata for this type.

Converts some archived metadata to the pointer metadata for itself.

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Deserializes using the given deserializer

Gets this error as an std::error::Error.

Performs the conversion.

Performs the conversion.

Gets the layout of the type.

The type for metadata in pointers and references to Self.

Converts the given value to a String. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.