Enum encode_unicode::error::InvalidUtf8Slice
[−]
[src]
pub enum InvalidUtf8Slice { Utf8(InvalidUtf8), Codepoint(InvalidCodepoint), TooShort(usize), }
Reasons why a byte slice is not valid UTF-8, in sinking precedence.
Variants
Utf8(InvalidUtf8)
Something is certainly wrong with the first byte.
Codepoint(InvalidCodepoint)
The encoded codepoint is invalid:
TooShort(usize)
The slice is too short; n bytes was required.
Trait Implementations
impl Clone for InvalidUtf8Slice
[src]
fn clone(&self) -> InvalidUtf8Slice
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Copy for InvalidUtf8Slice
[src]
impl Debug for InvalidUtf8Slice
[src]
impl PartialEq for InvalidUtf8Slice
[src]
fn eq(&self, __arg_0: &InvalidUtf8Slice) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &InvalidUtf8Slice) -> bool
This method tests for !=
.
impl Eq for InvalidUtf8Slice
[src]
impl From<InvalidUtf8> for InvalidUtf8Slice
[src]
fn from(error: InvalidUtf8) -> InvalidUtf8Slice
Performs the conversion.
impl From<InvalidCodepoint> for InvalidUtf8Slice
[src]
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
Performs the conversion.
impl Error for InvalidUtf8Slice
[src]
fn description(&self) -> &'static str
A short description of the error. Read more
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more