Enum rkyv::validation::ArchiveBoundsError[][src]

pub enum ArchiveBoundsError {
    Underaligned {
        expected_align: usize,
        actual_align: usize,
    },
    OutOfBounds {
        base: usize,
        offset: isize,
        archive_len: usize,
    },
    Overrun {
        pos: usize,
        size: usize,
        archive_len: usize,
    },
    Unaligned {
        pos: usize,
        align: usize,
    },
}

Errors that can occur when checking a relative pointer

Variants

Underaligned

The archive is under-aligned for one of the types inside

Show fields

Fields of Underaligned

expected_align: usize

The expected alignment of the archive

actual_align: usize

The actual alignment of the archive

OutOfBounds

A pointer pointed outside the bounds of the archive

Show fields

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

Show fields

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

Show fields

Fields of Unaligned

pos: usize

The position of the type

align: usize

The required alignment of the type

Trait Implementations

impl Debug for ArchiveBoundsError[src]

impl Display for ArchiveBoundsError[src]

impl Error for ArchiveBoundsError[src]

Auto Trait Implementations

Blanket Implementations

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

impl<T> ArchivePointee for T[src]

type ArchivedMetadata = ()

The archived version of the pointer metadata for this type.

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> Pointee for T[src]

type Metadata = ()

The type for metadata in pointers and references to Self.

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.