Enum ruma::signatures::JsonError [−][src]
#[non_exhaustive]
pub enum JsonError {
NotOfType {
target: String,
of_type: JsonType,
},
NotMultiplesOfType {
target: String,
of_type: JsonType,
},
JsonFieldMissingFromObject(String),
JsonKeyMissing {
for_target: String,
type_of: String,
with_key: String,
},
Serde(Error),
}
signatures
only.Expand description
All errors related to JSON validation/parsing.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Signals that target
is not of type of_type
(JsonType
).
Fields of NotOfType
Like JsonError::NotOfType
, only called when the target
is a multiple;
array, set, etc.
Fields of NotMultiplesOfType
JsonFieldMissingFromObject(String)
Signals that a specific field is missing from a JSON object.
Signals a key missing from a JSON object.
Note that this is different from JsonError::JsonFieldMissingFromObject
,
this error talks about an expected identifying key ("ed25519:abcd"
)
missing from a target, where the key has a specific “type”/name.
Fields of JsonKeyMissing
Serde(Error)
A more generic JSON error from [serde_json
].
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for JsonError
impl !UnwindSafe for JsonError
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more