pub enum Event<'a> {
Atom(Atom<'a>),
MapStart(ContainerShape),
MapEnd,
SeqStart(ContainerShape),
SeqEnd,
}Expand description
An event represents an atomic serialization and deserialization event.
§Serialization
Event and Emit are two close relatives. An
Emit can be stateful whereas Event represents a
single event. Atoms directly create an event whereas the emitters of
compound values keep handing out values which again produce events. To
go from Emits to events use
the SerializeDriver method.
§Deserialization
During deserialization events are passed to a
DeserializeDriver to drive the deserialization.
The start events of maps and sequences carry the ContainerShape.
Variants§
Implementations§
Source§impl<'a> Event<'a>
impl<'a> Event<'a>
Sourcepub const fn map_start() -> Event<'static>
pub const fn map_start() -> Event<'static>
Creates the start event of a map with the default shape.
Sourcepub const fn seq_start() -> Event<'static>
pub const fn seq_start() -> Event<'static>
Creates the start event of a sequence with the default shape.
Sourcepub fn as_borrowed(&self) -> Event<'_>
pub fn as_borrowed(&self) -> Event<'_>
Returns an event borrowing from this one.
Trait Implementations§
impl<'a> StructuralPartialEq for Event<'a>
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for Event<'a>
impl<'a> !UnwindSafe for Event<'a>
impl<'a> Freeze for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
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