pub enum JsonSerializerStateError {
UnexpectedCompound,
MapKeyAlreadyPending,
MapValueWithoutKey,
MapEndedWithPendingKey,
InvalidRawValueProtocol,
}Expand description
Invalid state produced by a malformed hand-written Serde implementation.
§Examples
use qubit_json::encode::JsonSerializationError;
use qubit_json::encode::JsonSerializationErrorKind;
use qubit_json::encode::JsonSerializerStateError;
let error = JsonSerializationError::new(JsonSerializationErrorKind::InvalidSerializerState {
reason: JsonSerializerStateError::MapValueWithoutKey,
});
assert_eq!(
error.serializer_state_error(),
Some(JsonSerializerStateError::MapValueWithoutKey),
);Variants§
UnexpectedCompound
A compound callback was used with the wrong compound state.
MapKeyAlreadyPending
A split-map key was submitted before the previous key received a value.
MapValueWithoutKey
A split-map value was submitted without a preceding key.
MapEndedWithPendingKey
A split map ended while one key was still waiting for its value.
InvalidRawValueProtocol
The private serde_json RawValue protocol had an invalid shape.
Trait Implementations§
Source§impl Clone for JsonSerializerStateError
impl Clone for JsonSerializerStateError
Source§fn clone(&self) -> JsonSerializerStateError
fn clone(&self) -> JsonSerializerStateError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for JsonSerializerStateError
Source§impl Debug for JsonSerializerStateError
impl Debug for JsonSerializerStateError
impl Eq for JsonSerializerStateError
Source§impl Hash for JsonSerializerStateError
impl Hash for JsonSerializerStateError
Source§impl PartialEq for JsonSerializerStateError
impl PartialEq for JsonSerializerStateError
impl StructuralPartialEq for JsonSerializerStateError
Auto Trait Implementations§
impl Freeze for JsonSerializerStateError
impl RefUnwindSafe for JsonSerializerStateError
impl Send for JsonSerializerStateError
impl Sync for JsonSerializerStateError
impl Unpin for JsonSerializerStateError
impl UnsafeUnpin for JsonSerializerStateError
impl UnwindSafe for JsonSerializerStateError
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