pub enum PayloadEvent<'a> {
Start(BytesStart<'a>),
End(BytesEnd<'a>),
Text(BytesText<'a>),
CData(BytesCData<'a>),
DocType(BytesText<'a>),
Eof,
}
Expand description
Simplified event which contains only these variants that used by deserializer,
but Text
events not yet fully processed.
Text
events should be trimmed if they does not surrounded by the other
Text
or CData
events. This event contains intermediate state of Text
event, where they are trimmed from the start, but not from the end. To trim
end spaces we should lookahead by one deserializer event (i. e. skip all
comments and processing instructions).
Variants§
Start(BytesStart<'a>)
Start tag (with attributes) <tag attr="value">
.
End(BytesEnd<'a>)
End tag </tag>
.
Text(BytesText<'a>)
Escaped character data between tags.
CData(BytesCData<'a>)
Unescaped character data stored in <![CDATA[...]]>
.
DocType(BytesText<'a>)
Document type definition data (DTD) stored in <!DOCTYPE ...>
.
Eof
End of XML document.
Implementations§
Source§impl<'a> PayloadEvent<'a>
impl<'a> PayloadEvent<'a>
Sourcefn into_owned(self) -> PayloadEvent<'static>
fn into_owned(self) -> PayloadEvent<'static>
Ensures that all data is owned to extend the object’s lifetime if necessary.
Trait Implementations§
Source§impl<'a> Clone for PayloadEvent<'a>
impl<'a> Clone for PayloadEvent<'a>
Source§fn clone(&self) -> PayloadEvent<'a>
fn clone(&self) -> PayloadEvent<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more