Struct rmpv::Utf8StringRef [−][src]
pub struct Utf8StringRef<'a> { /* fields omitted */ }
Expand description
A non-owning evil twin of Utf8String
. Does exactly the same thing except ownership.
Implementations
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
.
Consumes this object, yielding the string reference if the string is valid UTF-8, or else None
.
Converts a Utf8StringRef
into a byte vector.
Trait Implementations
Performs the conversion.
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl<'a> RefUnwindSafe for Utf8StringRef<'a>
impl<'a> Send for Utf8StringRef<'a>
impl<'a> Sync for Utf8StringRef<'a>
impl<'a> Unpin for Utf8StringRef<'a>
impl<'a> UnwindSafe for Utf8StringRef<'a>
Blanket Implementations
Mutably borrows from an owned value. Read more