[][src]Struct xml_tokens::Text

pub struct Text { /* fields omitted */ }

A Text is contained by the Token::Text variant.

See the XML 1.1 specification for details.

Methods

impl Text[src]

pub fn get_as_str(&self) -> &str[src]

Returns the text as a &str.

pub fn normalize_space(&self) -> String[src]

Return a space normalized String where whitespace is trimmed from the head and tail, and duplicate whitespace is replaced with a single space character in the body.

pub fn deduplicate_whitespace(&self) -> String[src]

Return a space deduplicated String where duplicate whitespace is replaced with a single space character.

pub fn normalize_space_deduplicate_head(&self) -> String[src]

Return a space normalized String but whitespace is only deduplicated from the head, rather than trimmed entirley.

pub fn normalize_space_deduplicate_tail(&self) -> String[src]

Return a space normalized String but whitespace is only deduplicated from the tail, rather than trimmed entirley.

Trait Implementations

impl PartialEq<Text> for Text[src]

impl Debug for Text[src]

Auto Trait Implementations

impl Send for Text

impl Unpin for Text

impl Sync for Text

impl UnwindSafe for Text

impl RefUnwindSafe for Text

Blanket Implementations

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]