[][src]Enum rkyv::validation::ArchiveMemoryError

pub enum ArchiveMemoryError {
    OutOfBounds {
        base: usize,
        offset: isize,
        archive_len: usize,
    },
    Overrun {
        pos: usize,
        size: usize,
        archive_len: usize,
    },
    Unaligned {
        pos: usize,
        align: usize,
    },
    ClaimOverlap {
        previous: Interval,
        current: Interval,
    },
}

Errors that can occur related to archive memory.

Variants

OutOfBounds

A pointer pointed outside the bounds of the archive

Fields of OutOfBounds

base: usize

The position of the relative pointer

offset: isize

The offset of the relative pointer

archive_len: usize

The length of the archive

Overrun

There wasn't enough space for the desired type at the pointed location

Fields of Overrun

pos: usize

The position of the type

size: usize

The desired size of the type

archive_len: usize

The length of the archive

Unaligned

The pointer wasn't aligned properly for the desired type

Fields of Unaligned

pos: usize

The position of the type

align: usize

The required alignment of the type

ClaimOverlap

Multiple objects claim to own the same memory region

Fields of ClaimOverlap

previous: Interval

A previous interval of bytes claimed by some object

current: Interval

The current interval of bytes being claimed by some object

Trait Implementations

impl Debug for ArchiveMemoryError[src]

impl Display for ArchiveMemoryError[src]

impl Error for ArchiveMemoryError[src]

impl<T> From<ArchiveMemoryError> for ArchivedRefError<T>[src]

impl<T> From<ArchiveMemoryError> for ArchivedSliceError<T>[src]

impl From<ArchiveMemoryError> for ArchivedStringSliceError[src]

impl<K, V> From<ArchiveMemoryError> for ArchivedHashMapError<K, V>[src]

impl<T> From<ArchiveMemoryError> for CheckArchiveError<T>[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.