#[non_exhaustive]#[repr(u8)]pub enum Error {
PreviouslyUsedVersion = 1,
ContractNotFound = 2,
GroupAlreadyExists = 3,
MaxGroupsExceeded = 4,
MaxTotalURefsExceeded = 5,
GroupDoesNotExist = 6,
UnableToRemoveURef = 7,
GroupInUse = 8,
URefAlreadyExists = 9,
}
Expand description
Set of errors which may happen when working with contract headers.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
PreviouslyUsedVersion = 1
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 = 2
Attempted to disable a contract that does not exist.
assert_eq!(2, Error::ContractNotFound as u8);
GroupAlreadyExists = 3
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 = 4
Attempted to add a new user group which exceeds the allowed maximum number of groups.
assert_eq!(4, Error::MaxGroupsExceeded as u8);
MaxTotalURefsExceeded = 5
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 = 6
Attempted to remove a URef from a group, which does not exist in the group.
assert_eq!(6, Error::GroupDoesNotExist as u8);
UnableToRemoveURef = 7
Attempted to remove unknown URef from the group.
assert_eq!(7, Error::UnableToRemoveURef as u8);
GroupInUse = 8
Group is use by at least one active contract.
assert_eq!(8, Error::GroupInUse as u8);
URefAlreadyExists = 9
URef already exists in given group.
assert_eq!(9, Error::URefAlreadyExists as u8);
Trait Implementations§
impl Eq for Error
impl StructuralPartialEq for Error
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> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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