[][src]Enum cosmwasm_vm::CommunicationError

#[non_exhaustive]pub enum CommunicationError {
    DerefErr {
        offset: u32,
        msg: String,
    },
    InvalidOrder {
        value: i32,
    },
    InvalidRegion {
        source: RegionValidationError,
    },
    InvalidUtf8 {
        msg: String,
    },
    RegionLengthTooBig {
        length: usize,
        max_length: usize,
    },
    RegionTooSmall {
        size: usize,
        required: usize,
    },
    ZeroAddress {},
}

An error in the communcation between contract and host. Those happen around imports and exports.

Variants (Non-exhaustive)

Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
DerefErr

Fields of DerefErr

offset: u32

the position in a Wasm linear memory

msg: String
InvalidOrder

Fields of InvalidOrder

value: i32
InvalidRegion

Fields of InvalidRegion

source: RegionValidationError
InvalidUtf8

Whenever UTF-8 bytes cannot be decoded into a unicode string, e.g. in String::from_utf8 or str::from_utf8.

Fields of InvalidUtf8

msg: String
RegionLengthTooBig

Fields of RegionLengthTooBig

length: usizemax_length: usize
RegionTooSmall

Fields of RegionTooSmall

size: usizerequired: usize
ZeroAddress

Fields of ZeroAddress

Trait Implementations

impl Debug for CommunicationError[src]

impl Display for CommunicationError[src]

impl Error for CommunicationError[src]

impl From<CommunicationError> for VmError[src]

impl From<RegionValidationError> for CommunicationError[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> Same<T> for T

type Output = T

Should always be 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.