Enum fluent_uri::enc::Decode
source · pub enum Decode<'a> {
Src(&'a str),
Dst(Vec<u8>),
}
Expand description
Variants§
Src(&'a str)
No percent-encoded octets are decoded.
Dst(Vec<u8>)
One or more percent-encoded octets are decoded.
Implementations§
source§impl<'a> Decode<'a>
impl<'a> Decode<'a>
sourcepub fn into_bytes(self) -> Cow<'a, [u8]>
pub fn into_bytes(self) -> Cow<'a, [u8]>
Consumes this Decode
and yields the underlying decoded bytes.
sourcepub fn into_string(self) -> Result<Cow<'a, str>, FromUtf8Error>
pub fn into_string(self) -> Result<Cow<'a, str>, FromUtf8Error>
Converts the decoded bytes to a string.
An error is returned if the decoded bytes are not valid UTF-8.
sourcepub fn into_string_lossy(self) -> Cow<'a, str>
pub fn into_string_lossy(self) -> Cow<'a, str>
Converts the decoded bytes to a string lossily.