#[non_exhaustive]#[repr(i32)]pub enum CommandArgumentErrorKind {
Show 20 variants
Unknown = 0,
TypeMismatch = 1,
InvalidBcsBytes = 2,
InvalidUsageOfPureArgument = 3,
InvalidArgumentToPrivateEntryFunction = 4,
IndexOutOfBounds = 5,
SecondaryIndexOutOfBounds = 6,
InvalidResultArity = 7,
InvalidGasCoinUsage = 8,
InvalidValueUsage = 9,
InvalidObjectByValue = 10,
InvalidObjectByMutRef = 11,
ConsensusObjectOperationNotAllowed = 12,
InvalidArgumentArity = 13,
InvalidTransferObject = 14,
InvalidMakeMoveVecNonObjectArgument = 15,
ArgumentWithoutValue = 16,
CannotMoveBorrowedValue = 17,
CannotWriteToExtendedReference = 18,
InvalidReferenceArgument = 19,
}Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown = 0
TypeMismatch = 1
The type of the value does not match the expected type.
InvalidBcsBytes = 2
The argument cannot be deserialized into a value of the specified type.
InvalidUsageOfPureArgument = 3
The argument cannot be instantiated from raw bytes.
InvalidArgumentToPrivateEntryFunction = 4
Invalid argument to private entry function. Private entry functions cannot take arguments from other Move functions.
IndexOutOfBounds = 5
Out of bounds access to input or results.
index field will be set indicating the invalid index value.
SecondaryIndexOutOfBounds = 6
Out of bounds access to subresult.
index and subresult fields will be set indicating the invalid index value.
InvalidResultArity = 7
Invalid usage of result.
Expected a single result but found either no return value or multiple.
index field will be set indicating the invalid index value.
InvalidGasCoinUsage = 8
Invalid usage of gas coin.
The gas coin can only be used by-value with a TransferObject command.
InvalidValueUsage = 9
Invalid usage of Move value.
- Mutably borrowed values require unique usage.
- Immutably borrowed values cannot be taken or borrowed mutably.
- Taken values cannot be used again.
InvalidObjectByValue = 10
Immutable objects cannot be passed by-value.
InvalidObjectByMutRef = 11
Immutable objects cannot be passed by mutable reference, &mut.
ConsensusObjectOperationNotAllowed = 12
Consensus object operations such as wrapping, freezing, or converting to owned are not allowed.
InvalidArgumentArity = 13
Invalid argument arity. Expected a single argument but found a result that expanded to multiple arguments.
InvalidTransferObject = 14
Object passed to TransferObject does not have public transfer, i.e. the store ability
InvalidMakeMoveVecNonObjectArgument = 15
First argument to MakeMoveVec is not an object. If no type is specified for MakeMoveVec, all arguments must be the same object type.
ArgumentWithoutValue = 16
Specified argument location does not have a value and cannot be used
CannotMoveBorrowedValue = 17
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 = 18
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 = 19
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.
Implementations§
Source§impl CommandArgumentErrorKind
impl CommandArgumentErrorKind
Sourcepub fn is_valid(value: i32) -> bool
pub fn is_valid(value: i32) -> bool
Returns true if value is a variant of CommandArgumentErrorKind.
Sourcepub fn from_i32(value: i32) -> Option<CommandArgumentErrorKind>
👎Deprecated: Use the TryFrom<i32> implementation instead
pub fn from_i32(value: i32) -> Option<CommandArgumentErrorKind>
Converts an i32 to a CommandArgumentErrorKind, or None if value is not a valid variant.
Source§impl CommandArgumentErrorKind
impl CommandArgumentErrorKind
Sourcepub fn as_str_name(&self) -> &'static str
pub fn as_str_name(&self) -> &'static str
String value of the enum field names used in the ProtoBuf definition.
The values are not transformed in any way and thus are considered stable (if the ProtoBuf definition does not change) and safe for programmatic use.
Sourcepub fn from_str_name(value: &str) -> Option<Self>
pub fn from_str_name(value: &str) -> Option<Self>
Creates an enum from field names used in the ProtoBuf definition.
Trait Implementations§
Source§impl Clone for CommandArgumentErrorKind
impl Clone for CommandArgumentErrorKind
Source§fn clone(&self) -> CommandArgumentErrorKind
fn clone(&self) -> CommandArgumentErrorKind
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CommandArgumentErrorKind
impl Debug for CommandArgumentErrorKind
Source§impl Default for CommandArgumentErrorKind
impl Default for CommandArgumentErrorKind
Source§fn default() -> CommandArgumentErrorKind
fn default() -> CommandArgumentErrorKind
§impl<'de> Deserialize<'de> for CommandArgumentErrorKind
impl<'de> Deserialize<'de> for CommandArgumentErrorKind
§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 From<CommandArgumentErrorKind> for i32
impl From<CommandArgumentErrorKind> for i32
Source§fn from(value: CommandArgumentErrorKind) -> i32
fn from(value: CommandArgumentErrorKind) -> i32
Source§impl Hash for CommandArgumentErrorKind
impl Hash for CommandArgumentErrorKind
Source§impl Ord for CommandArgumentErrorKind
impl Ord for CommandArgumentErrorKind
Source§fn cmp(&self, other: &CommandArgumentErrorKind) -> Ordering
fn cmp(&self, other: &CommandArgumentErrorKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for CommandArgumentErrorKind
impl PartialEq for CommandArgumentErrorKind
Source§impl PartialOrd for CommandArgumentErrorKind
impl PartialOrd for CommandArgumentErrorKind
§impl Serialize for CommandArgumentErrorKind
impl Serialize for CommandArgumentErrorKind
Source§impl TryFrom<i32> for CommandArgumentErrorKind
impl TryFrom<i32> for CommandArgumentErrorKind
Source§type Error = UnknownEnumValue
type Error = UnknownEnumValue
Source§fn try_from(value: i32) -> Result<CommandArgumentErrorKind, UnknownEnumValue>
fn try_from(value: i32) -> Result<CommandArgumentErrorKind, UnknownEnumValue>
impl Copy for CommandArgumentErrorKind
impl Eq for CommandArgumentErrorKind
impl StructuralPartialEq for CommandArgumentErrorKind
Auto Trait Implementations§
impl Freeze for CommandArgumentErrorKind
impl RefUnwindSafe for CommandArgumentErrorKind
impl Send for CommandArgumentErrorKind
impl Sync for CommandArgumentErrorKind
impl Unpin for CommandArgumentErrorKind
impl UnwindSafe for CommandArgumentErrorKind
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,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Conv for T
impl<T> Conv for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
impl<'de, T> FromBcs for Twhere
T: Deserialize<'de>,
fn from_bcs<'de>(bytes: &'de [u8]) -> Result<Self, Error>where
Self: Deserialize<'de>,
fn from_bcs_base64(base64: &str) -> Result<Self, Error>where
Self: DeserializeOwned,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request§impl<L> LayerExt<L> for L
impl<L> LayerExt<L> for L
§fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>where
L: Layer<S>,
Layered].§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read more§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§impl<T> Tap for T
impl<T> Tap for T
§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read more§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read more§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read more§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read more§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read more§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read more§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.