pub enum ContentType {
Raw,
Interpretable,
Whitespace,
}Expand description
The type of the content; it may be raw or in need of expansion, or it may be whitespace (if the source is XML)
Raw data is a Unicode string; in XML this corresponds to a CDATA section, in HML a raw string
Whitespace is space, tab and newline characters only; it comes from XML source, and if whitespace is deemed important for the application (as XML allows) then it is provided as such here. It may be used in XML output, in which case it generates the same whitespace; in HML output it is turned in to plain content with escape sequences for tabs and newlines.
Other content needs interpretation by the event provider, unless it is to be handled unparsed by the application (this is an application choice)
Variants§
Raw
Must change to Raw
Interpretable
Content can be intepreted (escapes/entities converted to characters/strings)
Whitespace
The content is whitespace that contains only tab, space or newlines (and hence need not be interpreted)
Trait Implementations§
Source§impl Clone for ContentType
impl Clone for ContentType
Source§fn clone(&self) -> ContentType
fn clone(&self) -> ContentType
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more