Enum near_primitives::errors::ActionErrorKind
source · [−]pub enum ActionErrorKind {
Show 16 variants
AccountAlreadyExists {
account_id: AccountId,
},
AccountDoesNotExist {
account_id: AccountId,
},
CreateAccountOnlyByRegistrar {
account_id: AccountId,
registrar_account_id: AccountId,
predecessor_id: AccountId,
},
CreateAccountNotAllowed {
account_id: AccountId,
predecessor_id: AccountId,
},
ActorNoPermission {
account_id: AccountId,
actor_id: AccountId,
},
DeleteKeyDoesNotExist {
account_id: AccountId,
public_key: PublicKey,
},
AddKeyAlreadyExists {
account_id: AccountId,
public_key: PublicKey,
},
DeleteAccountStaking {
account_id: AccountId,
},
LackBalanceForState {
account_id: AccountId,
amount: Balance,
},
TriesToUnstake {
account_id: AccountId,
},
TriesToStake {
account_id: AccountId,
stake: Balance,
locked: Balance,
balance: Balance,
},
InsufficientStake {
account_id: AccountId,
stake: Balance,
minimum_stake: Balance,
},
FunctionCallError(FunctionCallErrorSer),
NewReceiptValidationError(ReceiptValidationError),
OnlyImplicitAccountCreationAllowed {
account_id: AccountId,
},
DeleteAccountWithLargeState {
account_id: AccountId,
},
}Variants
AccountAlreadyExists
Fields
account_id: AccountIdHappens when CreateAccount action tries to create an account with account_id which is already exists in the storage
AccountDoesNotExist
Fields
account_id: AccountIdHappens when TX receiver_id doesn’t exist (but action is not Action::CreateAccount)
CreateAccountOnlyByRegistrar
A top-level account ID can only be created by registrar.
CreateAccountNotAllowed
A newly created account must be under a namespace of the creator account
ActorNoPermission
Administrative actions like DeployContract, Stake, AddKey, DeleteKey. can be proceed only if sender=receiver
or the first TX action is a CreateAccount action
DeleteKeyDoesNotExist
Account tries to remove an access key that doesn’t exist
AddKeyAlreadyExists
The public key is already used for an existing access key
DeleteAccountStaking
Fields
account_id: AccountIdAccount is staking and can not be deleted
LackBalanceForState
Fields
account_id: AccountIdAn account which needs balance
amount: BalanceBalance required to complete an action.
ActionReceipt can’t be completed, because the remaining balance will not be enough to cover storage.
TriesToUnstake
Fields
account_id: AccountIdAccount is not yet staked, but tries to unstake
TriesToStake
The account doesn’t have enough balance to increase the stake.
InsufficientStake
FunctionCallError(FunctionCallErrorSer)
An error occurred during a FunctionCall Action, parameter is debug message.
NewReceiptValidationError(ReceiptValidationError)
Error occurs when a new ActionReceipt created by the FunctionCall action fails
receipt validation.
OnlyImplicitAccountCreationAllowed
Fields
account_id: AccountIdError occurs when a CreateAccount action is called on hex-characters
account of length 64. See implicit account creation NEP:
https://github.com/nearprotocol/NEPs/pull/71.
DeleteAccountWithLargeState
Fields
account_id: AccountIdDelete account whose state is large is temporarily banned.
Trait Implementations
sourceimpl BorshDeserialize for ActionErrorKind where
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
PublicKey: BorshDeserialize,
AccountId: BorshDeserialize,
PublicKey: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
FunctionCallErrorSer: BorshDeserialize,
ReceiptValidationError: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
impl BorshDeserialize for ActionErrorKind where
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
PublicKey: BorshDeserialize,
AccountId: BorshDeserialize,
PublicKey: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
AccountId: BorshDeserialize,
Balance: BorshDeserialize,
Balance: BorshDeserialize,
FunctionCallErrorSer: BorshDeserialize,
ReceiptValidationError: BorshDeserialize,
AccountId: BorshDeserialize,
AccountId: BorshDeserialize,
sourceimpl BorshSerialize for ActionErrorKind where
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
PublicKey: BorshSerialize,
AccountId: BorshSerialize,
PublicKey: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
FunctionCallErrorSer: BorshSerialize,
ReceiptValidationError: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
impl BorshSerialize for ActionErrorKind where
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
PublicKey: BorshSerialize,
AccountId: BorshSerialize,
PublicKey: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
AccountId: BorshSerialize,
Balance: BorshSerialize,
Balance: BorshSerialize,
FunctionCallErrorSer: BorshSerialize,
ReceiptValidationError: BorshSerialize,
AccountId: BorshSerialize,
AccountId: BorshSerialize,
sourceimpl Clone for ActionErrorKind
impl Clone for ActionErrorKind
sourcefn clone(&self) -> ActionErrorKind
fn clone(&self) -> ActionErrorKind
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source. Read more
sourceimpl Debug for ActionErrorKind
impl Debug for ActionErrorKind
sourceimpl<'de> Deserialize<'de> for ActionErrorKind
impl<'de> Deserialize<'de> for ActionErrorKind
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Display for ActionErrorKind
impl Display for ActionErrorKind
sourceimpl From<ActionErrorKind> for ActionError
impl From<ActionErrorKind> for ActionError
sourcefn from(e: ActionErrorKind) -> ActionError
fn from(e: ActionErrorKind) -> ActionError
Converts to this type from the input type.
sourceimpl PartialEq<ActionErrorKind> for ActionErrorKind
impl PartialEq<ActionErrorKind> for ActionErrorKind
sourcefn eq(&self, other: &ActionErrorKind) -> bool
fn eq(&self, other: &ActionErrorKind) -> bool
This method tests for self and other values to be equal, and is used
by ==. Read more
sourcefn ne(&self, other: &ActionErrorKind) -> bool
fn ne(&self, other: &ActionErrorKind) -> bool
This method tests for !=.
sourceimpl Serialize for ActionErrorKind
impl Serialize for ActionErrorKind
impl Eq for ActionErrorKind
impl StructuralEq for ActionErrorKind
impl StructuralPartialEq for ActionErrorKind
Auto Trait Implementations
impl RefUnwindSafe for ActionErrorKind
impl Send for ActionErrorKind
impl Sync for ActionErrorKind
impl Unpin for ActionErrorKind
impl UnwindSafe for ActionErrorKind
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into)Uses borrowed data to replace owned data, usually by cloning. Read more