Enum casper_types::contracts::Error[][src]

#[repr(u8)]
pub enum Error {
    PreviouslyUsedVersion,
    ContractNotFound,
    GroupAlreadyExists,
    MaxGroupsExceeded,
    MaxTotalURefsExceeded,
    GroupDoesNotExist,
    UnableToRemoveURef,
    GroupInUse,
    URefAlreadyExists,
}
Expand description

Set of errors which may happen when working with contract headers.

Variants

PreviouslyUsedVersion

Attempt to override an existing or previously existing version with a new header (this is not allowed to ensure immutability of a given version).

assert_eq!(1, Error::PreviouslyUsedVersion as u8);
ContractNotFound

Attempted to disable a contract that does not exist.

assert_eq!(2, Error::ContractNotFound as u8);
GroupAlreadyExists

Attempted to create a user group which already exists (use the update function to change an existing user group).

assert_eq!(3, Error::GroupAlreadyExists as u8);
MaxGroupsExceeded

Attempted to add a new user group which exceeds the allowed maximum number of groups.

assert_eq!(4, Error::MaxGroupsExceeded as u8);
MaxTotalURefsExceeded

Attempted to add a new URef to a group, which resulted in the total number of URefs across all user groups to exceed the allowed maximum.

assert_eq!(5, Error::MaxTotalURefsExceeded as u8);
GroupDoesNotExist

Attempted to remove a URef from a group, which does not exist in the group.

assert_eq!(6, Error::GroupDoesNotExist as u8);
UnableToRemoveURef

Attempted to remove unknown URef from the group.

assert_eq!(7, Error::UnableToRemoveURef as u8);
GroupInUse

Group is use by at least one active contract.

assert_eq!(8, Error::GroupInUse as u8);
URefAlreadyExists

URef already exists in given group.

assert_eq!(9, Error::URefAlreadyExists as u8);

Trait Implementations

Formats the value using the given formatter. Read more

Performs the conversion.

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

This method tests for !=.

The type returned in the event of a conversion error.

Performs the conversion.

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

Converts self into a target type. Read more

Causes self to use its Binary implementation when Debug-formatted.

Causes self to use its Display implementation when Debug-formatted. Read more

Causes self to use its LowerExp implementation when Debug-formatted. Read more

Causes self to use its LowerHex implementation when Debug-formatted. Read more

Causes self to use its Octal implementation when Debug-formatted.

Causes self to use its Pointer implementation when Debug-formatted. Read more

Causes self to use its UpperExp implementation when Debug-formatted. Read more

Causes self to use its UpperHex implementation when Debug-formatted. Read more

Performs the conversion.

Performs the conversion.

Pipes a value into a function that cannot ordinarily be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait borrow into a function that cannot normally be called in suffix position. Read more

Pipes a trait mutable borrow into a function that cannot normally be called in suffix position. Read more

Pipes a dereference into a function that cannot normally be called in suffix position. Read more

Pipes a mutable dereference into a function that cannot normally be called in suffix position. Read more

Pipes a reference into a function that cannot ordinarily be called in suffix position. Read more

Pipes a mutable reference into a function that cannot ordinarily be called in suffix position. Read more

Should always be Self

Provides immutable access for inspection. Read more

Calls tap in debug builds, and does nothing in release builds.

Provides mutable access for modification. Read more

Calls tap_mut in debug builds, and does nothing in release builds.

Provides immutable access to the reference for inspection.

Calls tap_ref in debug builds, and does nothing in release builds.

Provides mutable access to the reference for modification.

Calls tap_ref_mut in debug builds, and does nothing in release builds.

Provides immutable access to the borrow for inspection. Read more

Calls tap_borrow in debug builds, and does nothing in release builds.

Provides mutable access to the borrow for modification.

Calls tap_borrow_mut in debug builds, and does nothing in release builds. Read more

Immutably dereferences self for inspection.

Calls tap_deref in debug builds, and does nothing in release builds.

Mutably dereferences self for modification.

Calls tap_deref_mut in debug builds, and does nothing in release builds. Read more

Attempts to convert self into a target type. Read more

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.