Struct quick_xml::events::BytesText [−][src]
pub struct BytesText<'a> { /* fields omitted */ }Expand description
Data from various events (most notably, Event::Text).
Implementations
Creates a new BytesText from an escaped byte sequence.
Creates a new BytesText from a byte sequence. The byte sequence is
expected not to be escaped.
Creates a new BytesText from an escaped string.
Creates a new BytesText from a string. The string is expected not to
be escaped.
Ensures that all data is owned to extend the object’s lifetime if necessary.
gets escaped content
Searches for ‘&’ into content and try to escape the coded character if possible returns Malformed error with index within element if ‘&’ is not followed by ‘;’
See also unescaped_with_custom_entities()
gets escaped content with custom entities
Searches for ‘&’ into content and try to escape the coded character if possible
returns Malformed error with index within element if ‘&’ is not followed by ‘;’
Additional entities can be provided in custom_entities.
Pre-condition
The keys and values of custom_entities, if any, must be valid UTF-8.
See also unescaped()
helper method to unescape then decode self using the reader encoding but without BOM (Byte order mark)
for performance reasons (could avoid allocating a String),
it might be wiser to manually use
- BytesText::unescaped()
- Reader::decode(…)
helper method to unescape then decode self using the reader encoding with custom entities but without BOM (Byte order mark)
for performance reasons (could avoid allocating a String),
it might be wiser to manually use
- BytesText::unescaped()
- Reader::decode(…)
Pre-condition
The keys and values of custom_entities, if any, must be valid UTF-8.
helper method to unescape then decode self using the reader encoding
for performance reasons (could avoid allocating a String),
it might be wiser to manually use
- BytesText::unescaped()
- Reader::decode(…)
helper method to unescape then decode self using the reader encoding with custom entities
for performance reasons (could avoid allocating a String),
it might be wiser to manually use
- BytesText::unescaped()
- Reader::decode(…)
Pre-condition
The keys and values of custom_entities, if any, must be valid UTF-8.
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for BytesText<'a>
impl<'a> UnwindSafe for BytesText<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more