pub enum ContainerKind {
Object,
Array,
Element,
}Expand description
The kind of container being parsed.
This distinguishes between format-specific container types to enable better error messages and type checking.
Variants§
Object
JSON/YAML/TOML object: definitely struct-like with key-value pairs. Type mismatches (e.g., object where array expected) should produce errors.
Array
JSON/YAML array: definitely sequence-like. Type mismatches (e.g., array where object expected) should produce errors.
Element
XML/KDL element: semantically ambiguous. Could be interpreted as struct, sequence, or scalar wrapper depending on target type. The deserializer decides based on what type it’s deserializing into.
Implementations§
Source§impl ContainerKind
impl ContainerKind
Trait Implementations§
Source§impl Clone for ContainerKind
impl Clone for ContainerKind
Source§fn clone(&self) -> ContainerKind
fn clone(&self) -> ContainerKind
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ContainerKind
impl Debug for ContainerKind
Source§impl PartialEq for ContainerKind
impl PartialEq for ContainerKind
impl Copy for ContainerKind
impl Eq for ContainerKind
impl StructuralPartialEq for ContainerKind
Auto Trait Implementations§
impl Freeze for ContainerKind
impl RefUnwindSafe for ContainerKind
impl Send for ContainerKind
impl Sync for ContainerKind
impl Unpin for ContainerKind
impl UnwindSafe for ContainerKind
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