pub enum Event<'input> {
Nothing,
StreamStart,
StreamEnd,
DocumentStart(bool),
DocumentEnd,
Alias(usize),
Scalar(Cow<'input, str>, ScalarStyle, usize, Option<Cow<'input, Tag>>),
SequenceStart(usize, Option<Cow<'input, Tag>>),
SequenceEnd,
MappingStart(usize, Option<Cow<'input, Tag>>),
MappingEnd,
}
Expand description
An event generated by the YAML parser.
Events are used in the low-level event-based API (push parser). The API entrypoint is the
EventReceiver
trait.
Variants§
Nothing
Reserved for internal use.
StreamStart
Event generated at the very beginning of parsing.
StreamEnd
Last event that will be generated by the parser. Signals EOF.
DocumentStart(bool)
The start of a YAML document.
When the boolean is true
, it is an explicit document start
directive (---
).
When the boolean is false
, it is an implicit document start
(without ---
).
DocumentEnd
The YAML end document directive (...
).
Alias(usize)
A YAML Alias.
Scalar(Cow<'input, str>, ScalarStyle, usize, Option<Cow<'input, Tag>>)
Value, style, anchor_id
, tag
SequenceStart(usize, Option<Cow<'input, Tag>>)
The start of a YAML sequence (array).
Tuple Fields
SequenceEnd
The end of a YAML sequence (array).
MappingStart(usize, Option<Cow<'input, Tag>>)
The start of a YAML mapping (object, hash).
Tuple Fields
MappingEnd
The end of a YAML mapping (object, hash).
Trait Implementations§
impl<'input> Eq for Event<'input>
impl<'input> StructuralPartialEq for Event<'input>
Auto Trait Implementations§
impl<'input> Freeze for Event<'input>
impl<'input> RefUnwindSafe for Event<'input>
impl<'input> Send for Event<'input>
impl<'input> Sync for Event<'input>
impl<'input> Unpin for Event<'input>
impl<'input> UnwindSafe for Event<'input>
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