[−][src]Struct xml_tokens::Text
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
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]
U: From<T>,
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
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> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,