[−][src]Struct quick_xml::events::BytesText
Data from various events (most notably, Event::Text
).
Methods
impl<'a> BytesText<'a>
[src]
pub fn from_escaped<C: Into<Cow<'a, [u8]>>>(content: C) -> BytesText<'a>
[src]
Creates a new BytesText
from an escaped byte sequence.
pub fn from_plain(content: &'a [u8]) -> BytesText<'a>
[src]
Creates a new BytesText
from a byte sequence. The byte sequence is
expected not to be escaped.
pub fn from_escaped_str<C: Into<Cow<'a, str>>>(content: C) -> BytesText<'a>
[src]
Creates a new BytesText
from an escaped string.
pub fn from_plain_str(content: &'a str) -> BytesText<'a>
[src]
Creates a new BytesText
from a string. The string is expected not to
be escaped.
pub fn into_owned(self) -> BytesText<'static>
[src]
Ensures that all data is owned to extend the object's lifetime if necessary.
pub fn unescaped(&self) -> Result<Cow<[u8]>>
[src]
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 ';'
pub fn unescape_and_decode<B: BufRead>(
&self,
reader: &Reader<B>
) -> Result<String>
[src]
&self,
reader: &Reader<B>
) -> Result<String>
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(...)
pub fn escaped(&self) -> &[u8]
[src]
Gets escaped content.
Trait Implementations
impl<'a> Clone for BytesText<'a>
[src]
impl<'a> Debug for BytesText<'a>
[src]
impl<'a> Deref for BytesText<'a>
[src]
Auto Trait Implementations
impl<'a> RefUnwindSafe for BytesText<'a>
impl<'a> Send for BytesText<'a>
impl<'a> Sync for BytesText<'a>
impl<'a> Unpin for BytesText<'a>
impl<'a> UnwindSafe for BytesText<'a>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,