pub enum JsonMapKeyKind {
Bytes,
None,
Unit,
UnitStruct,
NewtypeVariant,
Sequence,
Tuple,
TupleStruct,
TupleVariant,
Map,
Struct,
StructVariant,
}Expand description
Serde value shape that cannot be represented as a JSON object key.
§Examples
use qubit_json::encode::JsonMapKeyKind;
use qubit_json::encode::JsonSerializationError;
use qubit_json::encode::JsonSerializationErrorKind;
let error = JsonSerializationError::new(JsonSerializationErrorKind::UnsupportedMapKey {
kind: JsonMapKeyKind::Map,
});
assert_eq!(error.map_key_kind(), Some(JsonMapKeyKind::Map));Variants§
Bytes
A byte sequence.
None
An absent optional value.
Unit
A unit value.
UnitStruct
A unit struct.
NewtypeVariant
A newtype variant.
Sequence
A sequence.
Tuple
A tuple.
TupleStruct
A tuple struct.
TupleVariant
A tuple variant.
Map
A map.
Struct
A struct.
StructVariant
A struct variant.
Trait Implementations§
Source§impl Clone for JsonMapKeyKind
impl Clone for JsonMapKeyKind
Source§fn clone(&self) -> JsonMapKeyKind
fn clone(&self) -> JsonMapKeyKind
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 JsonMapKeyKind
Source§impl Debug for JsonMapKeyKind
impl Debug for JsonMapKeyKind
impl Eq for JsonMapKeyKind
Source§impl Hash for JsonMapKeyKind
impl Hash for JsonMapKeyKind
Source§impl PartialEq for JsonMapKeyKind
impl PartialEq for JsonMapKeyKind
impl StructuralPartialEq for JsonMapKeyKind
Auto Trait Implementations§
impl Freeze for JsonMapKeyKind
impl RefUnwindSafe for JsonMapKeyKind
impl Send for JsonMapKeyKind
impl Sync for JsonMapKeyKind
impl Unpin for JsonMapKeyKind
impl UnsafeUnpin for JsonMapKeyKind
impl UnwindSafe for JsonMapKeyKind
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