#[non_exhaustive]pub enum CommandArgumentError {
Show 19 variants
TypeMismatch,
InvalidBcsBytes,
InvalidUsageOfPureArgument,
InvalidArgumentToPrivateEntryFunction,
IndexOutOfBounds {
index: u16,
},
SecondaryIndexOutOfBounds {
result: u16,
subresult: u16,
},
InvalidResultArity {
result: u16,
},
InvalidGasCoinUsage,
InvalidValueUsage,
InvalidObjectByValue,
InvalidObjectByMutRef,
ConsensusObjectOperationNotAllowed,
InvalidArgumentArity,
InvalidTransferObject,
InvalidMakeMoveVecNonObjectArgument,
ArgumentWithoutValue,
CannotMoveBorrowedValue,
CannotWriteToExtendedReference,
InvalidReferenceArgument,
}Expand description
An error with an argument to a command
§BCS
The BCS serialized form for this type is defined by the following ABNF:
command-argument-error = type-mismatch
=/ invalid-bcs-bytes
=/ invalid-usage-of-pure-argument
=/ invalid-argument-to-private-entry-function
=/ index-out-of-bounds
=/ secondary-index-out-of-bound
=/ invalid-result-arity
=/ invalid-gas-coin-usage
=/ invalid-value-usage
=/ invalid-object-by-value
=/ invalid-object-by-mut-ref
=/ consensus-object-operation-not-allowed
type-mismatch = %x00
invalid-bcs-bytes = %x01
invalid-usage-of-pure-argument = %x02
invalid-argument-to-private-entry-function = %x03
index-out-of-bounds = %x04 u16
secondary-index-out-of-bound = %x05 u16 u16
invalid-result-arity = %x06 u16
invalid-gas-coin-usage = %x07
invalid-value-usage = %x08
invalid-object-by-value = %x09
invalid-object-by-mut-ref = %x0a
consensus-object-operation-not-allowed = %x0bVariants (Non-exhaustive)§
This enum is marked as non-exhaustive
TypeMismatch
The type of the value does not match the expected type
InvalidBcsBytes
The argument cannot be deserialized into a value of the specified type
InvalidUsageOfPureArgument
The argument cannot be instantiated from raw bytes
InvalidArgumentToPrivateEntryFunction
Invalid argument to private entry function. Private entry functions cannot take arguments from other Move functions.
IndexOutOfBounds
Out of bounds access to input or results
SecondaryIndexOutOfBounds
Out of bounds access to subresult
InvalidResultArity
Invalid usage of result. Expected a single result but found either no return value or multiple.
InvalidGasCoinUsage
Invalid usage of Gas coin. The Gas coin can only be used by-value with a TransferObjects command.
InvalidValueUsage
Invalid usage of move value.
InvalidObjectByValue
Immutable objects cannot be passed by-value.
InvalidObjectByMutRef
Immutable objects cannot be passed by mutable reference, &mut.
ConsensusObjectOperationNotAllowed
consensus object operations such a wrapping, freezing, or converting to owned are not allowed.
InvalidArgumentArity
Invalid argument arity. Expected a single argument but found a result that expanded to multiple arguments.
InvalidTransferObject
Object passed to TransferObject does not have public transfer, i.e. the store ability
InvalidMakeMoveVecNonObjectArgument
First argument to MakeMoveVec is not an object. If no type is specified for MakeMoveVec, all arguments must be the same object type.
ArgumentWithoutValue
Specified argument location does not have a value and cannot be used
CannotMoveBorrowedValue
Cannot move a borrowed value. The value’s type does resulted in this argument usage being
inferred as a move. This is likely due to the type not having the copy ability; although
in rare cases, it could also be this is the last usage of a value without the drop
ability.
CannotWriteToExtendedReference
Cannot write to an argument location that is still borrowed, and where that borrow is an extension of that reference. This is likely due to this argument being used in a Move call that returns a reference, and that reference is used in a later command.
InvalidReferenceArgument
The argument specified cannot be used as a reference argument in the Move call. Either the argument is a mutable reference and it conflicts with another argument to the call, or the argument is mutable and another reference extends it and will be used in a later command.
Trait Implementations§
Source§impl Arbitrary for CommandArgumentError
impl Arbitrary for CommandArgumentError
Source§type Parameters = ()
type Parameters = ()
arbitrary_with accepts for configuration
of the generated Strategy. Parameters must implement Default.Source§type Strategy = BoxedStrategy<CommandArgumentError>
type Strategy = BoxedStrategy<CommandArgumentError>
Strategy used to generate values of type Self.Source§fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
fn arbitrary_with(args: <Self as Arbitrary>::Parameters) -> Self::Strategy
Source§impl Clone for CommandArgumentError
impl Clone for CommandArgumentError
Source§fn clone(&self) -> CommandArgumentError
fn clone(&self) -> CommandArgumentError
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandArgumentError
impl Debug for CommandArgumentError
Source§impl<'de> Deserialize<'de> for CommandArgumentError
impl<'de> Deserialize<'de> for CommandArgumentError
Source§fn 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>,
Source§impl PartialEq for CommandArgumentError
impl PartialEq for CommandArgumentError
Source§impl Serialize for CommandArgumentError
impl Serialize for CommandArgumentError
impl Eq for CommandArgumentError
impl StructuralPartialEq for CommandArgumentError
Auto Trait Implementations§
impl Freeze for CommandArgumentError
impl RefUnwindSafe for CommandArgumentError
impl Send for CommandArgumentError
impl Sync for CommandArgumentError
impl Unpin for CommandArgumentError
impl UnwindSafe for CommandArgumentError
Blanket Implementations§
§impl<U> As for U
impl<U> As for U
§fn as_<T>(self) -> Twhere
T: CastFrom<U>,
fn as_<T>(self) -> Twhere
T: CastFrom<U>,
self to type T. The semantics of numeric casting with the as operator are followed, so <T as As>::as_::<U> can be used in the same way as T as U for numeric conversions. Read moreSource§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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
Source§fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
serde only.Source§fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
serde only.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