Enum Error

Source
pub enum Error {
Show 21 variants InvalidContext = 60_000, InsufficientBalance = 60_001, InsufficientAllowance = 60_002, Overflow = 60_003, PackageHashMissing = 60_004, PackageHashNotPackage = 60_005, InvalidEventsMode = 60_006, MissingEventsMode = 60_007, Phantom = 60_008, FailedToGetArgBytes = 60_009, InsufficientRights = 60_010, InvalidAdminList = 60_011, InvalidMinterList = 60_012, InvalidNoneList = 60_013, InvalidEnableMBFlag = 60_014, AlreadyInitialized = 60_015, MintBurnDisabled = 60_016, CannotTargetSelfUser = 60_017, InvalidBurnTarget = 60_018, _MissingPackageHashForUpgrade = 60_019, InvalidState = 60_100,
}
Expand description

Error enum for the CEP-18 contract.

Variants§

§

InvalidContext = 60_000

CEP-18 contract called from within an invalid context.

§

InsufficientBalance = 60_001

Spender does not have enough balance.

§

InsufficientAllowance = 60_002

Spender does not have enough allowance approved.

§

Overflow = 60_003

Operation would cause an integer overflow.

§

PackageHashMissing = 60_004

A required package hash was not specified.

§

PackageHashNotPackage = 60_005

The package hash specified does not represent a package.

§

InvalidEventsMode = 60_006

An invalid event mode was specified.

§

MissingEventsMode = 60_007

The event mode required was not specified.

§

Phantom = 60_008

An unknown error occurred.

§

FailedToGetArgBytes = 60_009

Failed to read the runtime arguments provided.

§

InsufficientRights = 60_010

The caller does not have sufficient security access.

§

InvalidAdminList = 60_011

The list of Admin accounts provided is invalid.

§

InvalidMinterList = 60_012

The list of accounts that can mint tokens is invalid.

§

InvalidNoneList = 60_013

The list of accounts with no access rights is invalid.

§

InvalidEnableMBFlag = 60_014

The flag to enable the mint and burn mode is invalid.

§

AlreadyInitialized = 60_015

This contract instance cannot be initialized again.

§

MintBurnDisabled = 60_016

The mint and burn mode is disabled.

§

CannotTargetSelfUser = 60_017

The user cannot target themselves.

§

InvalidBurnTarget = 60_018

The burn target is invalid.

§

_MissingPackageHashForUpgrade = 60_019

The package hash for the upgrade is missing. This error is not used by Odra implementation yet.

§

InvalidState = 60_100

The contract is in an invalid state. This error should never happen.

Trait Implementations§

Source§

impl From<Error> for OdraError

Source§

fn from(error: Error) -> Self

Converts to this type from the input type.
Source§

impl SchemaErrors for Error

Source§

fn schema_errors() -> Vec<UserError>

Returns a vector of UserErrors.

Auto Trait Implementations§

§

impl Freeze for Error

§

impl RefUnwindSafe for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnwindSafe for Error

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more