pub struct Reject {
    pub error_code: NonZeroI32,
    pub return_value: Option<Vec<u8>>,
}
Expand description

An error message, signalling rejection of a smart contract invocation. The client will see the error code as a reject reason; if a schema is provided, the error message corresponding to the error code will be displayed. The valid range for an error code is from i32::MIN to -1. A return value can also be provided.

Fields

error_code: NonZeroI32return_value: Option<Vec<u8>>

Implementations

This returns None for all values >= 0 and Some otherwise.

Trait Implementations

Formats the value using the given formatter. Read more

Default error is i32::MIN.

Returns the “default value” for a type. Read more

Mapped to i32::MIN + 1.

Converts to this type from the input type.

AmountTooLarge is i32::MIN + 15, MissingAccount is i32::MIN + 16, MissingContract is i32::MIN + 17, MissingEntrypoint is i32::MIN + 18, MessageFailed is i32::MIN + 19, LogicReject is i32::MIN + 20, Trap is i32::MIN + 21.

Converts to this type from the input type.

Full is mapped to i32::MIN + 3, Malformed is mapped to i32::MIN + 4.

Converts to this type from the input type.

MissingInitPrefix is mapped to i32::MIN + 5, TooLong to i32::MIN + 6, ContainsDot to i32::MIN + 9, and InvalidCharacters to i32::MIN + 10.

Converts to this type from the input type.

MissingDotSeparator is mapped to i32::MIN + 7, TooLong to i32::MIN + 8, and InvalidCharacters to i32::MIN + 11.

Converts to this type from the input type.

Converts to this type from the input type.

The error code is i32::MIN + 12.

Converts to this type from the input type.

Mapped to i32::MIN + 2.

Converts to this type from the input type.

AmountTooLarge is i32::MIN + 13, MissingAccount is i32::MIN + 14.

Converts to this type from the input type.

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

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.