Struct rmp_serde::Raw [−][src]
pub struct Raw { /* fields omitted */ }
Expand description
Helper that allows both to encode and decode strings no matter whether they contain valid or invalid UTF-8.
Regardless of validity the UTF-8 content this type will always be serialized as a string.
Implementations
Returns the string reference if the raw is valid UTF-8, or else None
.
Returns the underlying Utf8Error
if the raw contains invalid UTF-8 sequence, or
else None
.
Returns a byte slice of this raw’s contents.
Consumes this object, yielding the string if the raw is valid UTF-8, or else None
.
Converts a Raw
into a byte vector.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for Raw
impl UnwindSafe for Raw
Blanket Implementations
Mutably borrows from an owned value. Read more