pub enum ExpectJsonError {
Show 19 variants
FailedToSerialiseExpected(Error),
FailedToSerialiseReceived(Error),
DifferentTypes {
context: Context<'static>,
received: ValueTypeObject,
expected: ValueTypeObject,
},
DifferentValues {
context: Context<'static>,
json_type: JsonType,
received: ValueObject,
expected: ValueObject,
},
ReceivedIsNotNull {
context: Context<'static>,
received: ValueTypeObject,
},
ReceivedIsNull {
context: Context<'static>,
expected: ValueTypeObject,
},
ObjectKeyMissing {
context: Context<'static>,
expected_key: String,
},
ArrayContainsDifferentTypes {
context: Context<'static>,
received: Box<ValueTypeObject>,
received_array: Box<ArrayObject>,
expected: Box<ValueTypeObject>,
expected_full_array: Box<ArrayObject>,
},
ArrayContainsDifferentValues {
context: Context<'static>,
json_type: JsonType,
received: Box<ValueObject>,
received_array: Box<ArrayObject>,
expected: Box<ValueObject>,
expected_full_array: Box<ArrayObject>,
},
ArrayMissingInMiddle {
context: Context<'static>,
received_array: ArrayObject,
expected_array: ArrayObject,
},
ArrayValuesAreDifferent {
context: Context<'static>,
received_array: ArrayObject,
expected_array: ArrayObject,
},
ArrayIndexMissing {
context: Context<'static>,
expected_index: usize,
},
ArrayMissingAtEnd {
context: Context<'static>,
expected_array: ArrayObject,
received_array: ArrayObject,
missing_in_received: ArrayObject,
},
ArrayMissingAtStart {
context: Context<'static>,
expected_array: ArrayObject,
received_array: ArrayObject,
missing_in_received: ArrayObject,
},
ArrayExtraAtEnd {
context: Context<'static>,
expected_array: ArrayObject,
received_array: ArrayObject,
extra_in_received: ArrayObject,
},
ArrayExtraAtStart {
context: Context<'static>,
expected_array: ArrayObject,
received_array: ArrayObject,
extra_in_received: ArrayObject,
},
ObjectReceivedHasExtraKey {
context: Context<'static>,
received_extra_field: String,
received_obj: ValueObject,
expected_obj: ValueObject,
},
ObjectReceivedHasExtraKeys {
context: Context<'static>,
received_extra_fields: Vec<String>,
received_obj: ValueObject,
expected_obj: ValueObject,
},
ExpectOpError {
source: ExpectOpError,
},
}Variants§
FailedToSerialiseExpected(Error)
FailedToSerialiseReceived(Error)
DifferentTypes
DifferentValues
ReceivedIsNotNull
ReceivedIsNull
ObjectKeyMissing
ArrayContainsDifferentTypes
Fields
ArrayContainsDifferentValues
Fields
ArrayMissingInMiddle
ArrayValuesAreDifferent
ArrayIndexMissing
ArrayMissingAtEnd
ArrayMissingAtStart
ArrayExtraAtEnd
ArrayExtraAtStart
ObjectReceivedHasExtraKey
ObjectReceivedHasExtraKeys
ExpectOpError
Fields
§
source: ExpectOpErrorTrait Implementations§
Source§impl Debug for ExpectJsonError
impl Debug for ExpectJsonError
Source§impl Display for ExpectJsonError
impl Display for ExpectJsonError
Source§impl Error for ExpectJsonError
impl Error for ExpectJsonError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<ExpectJsonError> for ExpectOpError
impl From<ExpectJsonError> for ExpectOpError
Source§fn from(error: ExpectJsonError) -> Self
fn from(error: ExpectJsonError) -> Self
Converts to this type from the input type.
Source§impl From<ExpectOpError> for ExpectJsonError
impl From<ExpectOpError> for ExpectJsonError
Source§fn from(source: ExpectOpError) -> Self
fn from(source: ExpectOpError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExpectJsonError
impl !RefUnwindSafe for ExpectJsonError
impl !Send for ExpectJsonError
impl !Sync for ExpectJsonError
impl Unpin for ExpectJsonError
impl !UnwindSafe for ExpectJsonError
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
Mutably borrows from an owned value. Read more