Struct xmlparser::StrSpan[][src]

#[must_use]
pub struct StrSpan<'a> { /* fields omitted */ }

An immutable string slice.

Unlike &str contains a reference to the original string and a span position.

Methods

impl<'a> StrSpan<'a>
[src]

Constructs a new StrSpan from substring.

Returns a start position of the span.

Returns a end position of the span.

Returns a length of the span.

Returns a length of the span.

Returns a length of the span underling string.

Returns a span slice.

A bit expensive, since Rust checks for char boundary.

Returns a span slice as bytes.

The same as to_str but does not involve char boundary checking.

Returns an underling string region as StrSpan.

Returns an underling string.

Returns a trimmed version of this StrSpan.

Removes only leading and trailing spaces.

This function will trim escaped spaces (aka &#x20;) too.

Trait Implementations

impl<'a> From<StrSpan<'a>> for Stream<'a>
[src]

Performs the conversion.

impl<'a> PartialEq for StrSpan<'a>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<'a> Clone for StrSpan<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Copy for StrSpan<'a>
[src]

impl<'a> From<&'a str> for StrSpan<'a>
[src]

Performs the conversion.

impl<'a> Debug for StrSpan<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> Display for StrSpan<'a>
[src]

Formats the value using the given formatter. Read more

impl<'a> From<StrSpan<'a>> for TextUnescape<'a>
[src]

Performs the conversion.

impl<'a> From<StrSpan<'a>> for Tokenizer<'a>
[src]

Performs the conversion.

Auto Trait Implementations

impl<'a> Send for StrSpan<'a>

impl<'a> Sync for StrSpan<'a>