pub enum JsonArgsErrorDetails {
Show 25 variants
Bytesrepr(Error),
CannotParseToI32,
CannotParseToI64,
CannotParseToU8,
CannotParseToU32,
CannotParseToU64,
ParseInt(ParseIntError),
ParseBigint(FromDecStrErr),
ParseKeyFromString(KeyFromStrError),
KeyObjectHasInvalidNumberOfFields,
KeyObjectHasInvalidFieldType,
KeyObjectHasInvalidVariant,
ParseURef(URefFromStrError),
ParsePublicKey(Error),
HexDecode(DecodeError),
ByteArrayLengthMismatch {
expected_length: u32,
actual_length: u32,
},
ResultObjectHasInvalidNumberOfFields,
ResultObjectHasInvalidVariant,
MapTypeNotValidAsObject(CLType),
MapArrayHasInvalidEntryType,
MapEntryObjectHasInvalidNumberOfFields,
MapEntryObjectMissingKeyField,
MapEntryObjectMissingValueField,
TupleEntryCountMismatch {
expected: usize,
actual: usize,
},
IncompatibleType,
}Expand description
Details of an error associated with parsing a JSON arg into a NamedArg.
Variants§
Bytesrepr(Error)
bytesrepr error while constructing a CLValue.
CannotParseToI32
Cannot convert the given JSON Number to an i32.
CannotParseToI64
Cannot convert the given JSON Number to an i64.
CannotParseToU8
Cannot convert the given JSON Number to a u8.
CannotParseToU32
Cannot convert the given JSON Number to a u32.
CannotParseToU64
Cannot convert the given JSON Number to a u64.
ParseInt(ParseIntError)
Error parsing an integer from a decimal string representation.
ParseBigint(FromDecStrErr)
Error parsing a big integer from a decimal string representation.
ParseKeyFromString(KeyFromStrError)
Error parsing a Key from a formatted string representation.
KeyObjectHasInvalidNumberOfFields
JSON Object representing a Key must have the structure
{"<KEY VARIANT>":"<KEY AS FORMATTED STRING>"}, but the given one does not have just one
field.
KeyObjectHasInvalidFieldType
JSON Object representing a Key must have the structure
{"<KEY VARIANT>":"<KEY AS FORMATTED STRING>"}, but the given one does not have a String
value.
KeyObjectHasInvalidVariant
JSON Object representing a Key must have the structure
{"<KEY VARIANT>":"<KEY AS FORMATTED STRING>"}, but the given one does match any valid
Key variant.
ParseURef(URefFromStrError)
Error parsing a URef from a formatted string representation.
ParsePublicKey(Error)
Error parsing a PublicKey from a formatted string representation.
HexDecode(DecodeError)
Error parsing a hex string.
ByteArrayLengthMismatch
Number of hex-decoded bytes not as expected.
Fields
ResultObjectHasInvalidNumberOfFields
JSON Object representing a Result must have the structure {"Ok":<VALUE>} or
{"Err":<VALUE>}, but the given one does not have just one field.
ResultObjectHasInvalidVariant
JSON Object representing a Result must have the structure {"Ok":<VALUE>} or
{"Err":<VALUE>}, but the given one is neither "Ok" nor "Err".
MapTypeNotValidAsObject(CLType)
CLType::Maps can only be represented as JSON Objects if the map’s key type is a string or
number.
MapArrayHasInvalidEntryType
JSON Array representing a CLType::Map must have all entries with the structure
{"key":<VALUE>,"value":<VALUE>}, but the given one has an entry which is not an Object.
MapEntryObjectHasInvalidNumberOfFields
JSON Object representing a map entry must have the structure
{"key":<VALUE>,"value":<VALUE>}, but the given one does not have exactly two fields.
MapEntryObjectMissingKeyField
JSON Object representing a map entry must have the structure
{"key":<VALUE>,"value":<VALUE>}, but the given one does not have "key".
MapEntryObjectMissingValueField
JSON Object representing a map entry must have the structure
{"key":<VALUE>,"value":<VALUE>}, but the given one does not have "value".
TupleEntryCountMismatch
Number of tuple entries not as expected.
Fields
IncompatibleType
The given CLType fundamentally cannot be constructed from the given type of JSON value.
Trait Implementations§
Source§impl Debug for ErrorDetails
impl Debug for ErrorDetails
Source§impl Display for ErrorDetails
impl Display for ErrorDetails
Source§impl Error for ErrorDetails
impl Error for ErrorDetails
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<DecodeError> for ErrorDetails
impl From<DecodeError> for ErrorDetails
Source§fn from(source: DecodeError) -> Self
fn from(source: DecodeError) -> Self
Source§impl From<Error> for ErrorDetails
impl From<Error> for ErrorDetails
Source§fn from(source: CryptoError) -> Self
fn from(source: CryptoError) -> Self
Source§impl From<Error> for ErrorDetails
impl From<Error> for ErrorDetails
Source§fn from(error: BytesreprError) -> Self
fn from(error: BytesreprError) -> Self
Source§impl From<FromDecStrErr> for ErrorDetails
impl From<FromDecStrErr> for ErrorDetails
Source§fn from(source: FromDecStrErr) -> Self
fn from(source: FromDecStrErr) -> Self
Source§impl From<FromStrError> for ErrorDetails
impl From<FromStrError> for ErrorDetails
Source§fn from(error: KeyFromStrError) -> Self
fn from(error: KeyFromStrError) -> Self
Source§impl From<ParseIntError> for ErrorDetails
impl From<ParseIntError> for ErrorDetails
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<FromStrError> for ErrorDetails
impl From<FromStrError> for ErrorDetails
Source§fn from(error: URefFromStrError) -> Self
fn from(error: URefFromStrError) -> Self
Auto Trait Implementations§
impl Freeze for ErrorDetails
impl RefUnwindSafe for ErrorDetails
impl Send for ErrorDetails
impl Sync for ErrorDetails
impl Unpin for ErrorDetails
impl UnwindSafe for ErrorDetails
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<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.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 moreSource§impl<T> PipeAsRef for T
impl<T> PipeAsRef for T
Source§impl<T> PipeBorrow for T
impl<T> PipeBorrow for T
Source§impl<T> PipeDeref for T
impl<T> PipeDeref for T
Source§impl<T> PipeRef for T
impl<T> PipeRef for T
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
Source§fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
fn tap_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&Self) -> R,
tap in debug builds, and does nothing in release builds.Source§fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
Source§fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
fn tap_mut_dbg<F, R>(self, func: F) -> Selfwhere
F: FnOnce(&mut Self) -> R,
tap_mut in debug builds, and does nothing in release builds.Source§impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
impl<T, U> TapAsRef<U> for Twhere
U: ?Sized,
Source§fn tap_ref<F, R>(self, func: F) -> Self
fn tap_ref<F, R>(self, func: F) -> Self
Source§fn tap_ref_dbg<F, R>(self, func: F) -> Self
fn tap_ref_dbg<F, R>(self, func: F) -> Self
tap_ref in debug builds, and does nothing in release builds.Source§fn tap_ref_mut<F, R>(self, func: F) -> Self
fn tap_ref_mut<F, R>(self, func: F) -> Self
Source§impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
impl<T, U> TapBorrow<U> for Twhere
U: ?Sized,
Source§fn tap_borrow<F, R>(self, func: F) -> Self
fn tap_borrow<F, R>(self, func: F) -> Self
Source§fn tap_borrow_dbg<F, R>(self, func: F) -> Self
fn tap_borrow_dbg<F, R>(self, func: F) -> Self
tap_borrow in debug builds, and does nothing in release builds.Source§fn tap_borrow_mut<F, R>(self, func: F) -> Self
fn tap_borrow_mut<F, R>(self, func: F) -> Self
Source§impl<T> TapDeref for T
impl<T> TapDeref for T
Source§fn tap_deref_dbg<F, R>(self, func: F) -> Self
fn tap_deref_dbg<F, R>(self, func: F) -> Self
tap_deref in debug builds, and does nothing in release builds.Source§fn tap_deref_mut<F, R>(self, func: F) -> Self
fn tap_deref_mut<F, R>(self, func: F) -> Self
self for modification.