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> 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> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.