#[non_exhaustive]pub enum Element {
Scalar {
tag: Tag,
value: Value,
},
ContainerStart {
tag: Tag,
kind: ContainerKind,
},
ContainerEnd,
}Expand description
One step of the streaming reader.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Scalar
A complete scalar (or string/bytes) element.
Fields
ContainerStart
A container has just been opened. Subsequent next() calls
return the container’s children until a matching
ContainerEnd.
Fields
§
kind: ContainerKindWhich container kind was opened.
ContainerEnd
The most recently-opened container has been closed.
Trait Implementations§
Source§impl From<ElementRef<'_>> for Element
impl From<ElementRef<'_>> for Element
Source§fn from(e: ElementRef<'_>) -> Self
fn from(e: ElementRef<'_>) -> Self
Converts to this type from the input type.
impl StructuralPartialEq for Element
Auto Trait Implementations§
impl Freeze for Element
impl RefUnwindSafe for Element
impl Send for Element
impl Sync for Element
impl Unpin for Element
impl UnsafeUnpin for Element
impl UnwindSafe for Element
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