pub enum CommandArgumentError {
Show 13 variants
TypeMismatch,
InvalidBcsBytes,
InvalidUsageOfPureArgument,
InvalidArgumentToPrivateEntryFunction,
IndexOutOfBounds {
index: u16,
},
SecondaryIndexOutOfBounds {
result: u16,
subresult: u16,
},
InvalidResultArity {
result: u16,
},
InvalidGasCoinUsage,
InvalidValueUsage,
InvalidObjectByValue,
InvalidObjectByMutRef,
SharedObjectOperationNotAllowed,
InvalidArgumentArity,
}
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
=/ shared-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
shared-object-operation-not-allowed = %x0b
Variants§
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.
Shared 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.
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
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for CommandArgumentError
serde
only.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
Available on crate feature serde
only.
impl Serialize for CommandArgumentError
serde
only.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<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