Skip to main content

DirectMappingError

Enum DirectMappingError 

Source
pub enum DirectMappingError {
    NullInput,
    ArithmeticOverflow,
    TruncatedInput,
    TooManyAccounts {
        count: usize,
        capacity: usize,
    },
    MalformedDuplicate {
        slot: usize,
        duplicate_of: usize,
    },
    InstructionDataMismatch,
    PointerTableMisaligned,
    PointerOutOfBounds {
        slot: usize,
    },
    PointerMisaligned {
        slot: usize,
    },
    NonCanonicalPointer {
        slot: usize,
    },
}
Expand description

Failure reported by the host/replay SIMD-0449 conformance decoder.

The on-chain fast path deliberately trusts the loader: the SVM constructs the pointer table and a program cannot alter it before entry. Replay tools, alternate SVMs, fuzzers, and fixture consumers do not get that trust for free, so deserialize_accounts_0449_checked validates the complete account walk and requires every table entry to equal the canonical record pointer the legacy ABI walk derives.

Variants§

§

NullInput

The input pointer was null.

§

ArithmeticOverflow

Integer arithmetic over the supplied frame bounds overflowed.

§

TruncatedInput

The supplied byte length ends in the middle of an ABI component.

§

TooManyAccounts

The frame contains more accounts than the caller-provided output.

Fields

§count: usize
§capacity: usize
§

MalformedDuplicate

A duplicate marker did not refer to a strictly earlier slot.

Fields

§slot: usize
§duplicate_of: usize
§

InstructionDataMismatch

The caller’s instruction-data slice is not the exact slice in input.

§

PointerTableMisaligned

The computed pointer table is not aligned to an eight-byte boundary.

§

PointerOutOfBounds

A table entry points outside the supplied input frame.

Fields

§slot: usize
§

PointerMisaligned

A table entry is not aligned like a canonical account record.

Fields

§slot: usize
§

NonCanonicalPointer

A table entry is in-bounds but does not name this slot’s canonical account record (including duplicate-slot canonicalization).

Fields

§slot: usize

Trait Implementations§

Source§

impl Clone for DirectMappingError

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for DirectMappingError

Source§

impl Debug for DirectMappingError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for DirectMappingError

Source§

impl PartialEq for DirectMappingError

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for DirectMappingError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.