Struct rmpv::Utf8StringRef [] [src]

pub struct Utf8StringRef<'a> { /* fields omitted */ }

A non-owning evil twin of Utf8String. Does exactly the same thing except ownership.

Methods

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

Returns true if the string is valid UTF-8.

Returns true if the string contains invalid UTF-8 sequence.

Returns the string reference if the string is valid UTF-8, or else None.

Returns the underlying Utf8Error if the string contains invalud UTF-8 sequence, or else None.

Returns a byte slice of this string contents no matter whether it's valid or not UTF-8.

Consumes this object, yielding the string if the string is valid UTF-8, or else None.

Converts a Utf8StringRef into a byte vector.

Trait Implementations

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

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

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

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

Formats the value using the given formatter.

impl<'a> PartialEq for Utf8StringRef<'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> Display for Utf8StringRef<'a>
[src]

Formats the value using the given formatter.

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

Performs the conversion.

impl<'a> Into<Utf8String> for Utf8StringRef<'a>
[src]

Performs the conversion.