Struct svgdom::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.

Important traits for &'a [u8]

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 PathParser<'a>
[src]

Important traits for PathParser<'a>

Performs the conversion.

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

Important traits for TransformListParser<'a>

Performs the conversion.

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

Important traits for PointsParser<'a>

Performs the conversion.

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

Important traits for LengthListParser<'a>

Performs the conversion.

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

Important traits for StyleParser<'a>

Performs the conversion.

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

Important traits for NumberListParser<'a>

Performs the conversion.

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

Formats the value using the given formatter. Read more

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

Formats the value using the given formatter. Read more

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

impl<'a> PartialEq<StrSpan<'a>> 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> From<StrSpan<'a>> for Stream<'a>
[src]

Performs the conversion.

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

Important traits for Tokenizer<'a>

Performs the conversion.

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

Performs the conversion.

Auto Trait Implementations

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

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