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]
impl Clone for InvalidUtf8Slice
fn clone(&self) -> InvalidUtf8Slice
[src]
fn clone(&self) -> InvalidUtf8Slice
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Copy for InvalidUtf8Slice
[src]
impl Copy for InvalidUtf8Slice
impl Debug for InvalidUtf8Slice
[src]
impl Debug for InvalidUtf8Slice
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl PartialEq for InvalidUtf8Slice
[src]
impl PartialEq for InvalidUtf8Slice
fn eq(&self, other: &InvalidUtf8Slice) -> bool
[src]
fn eq(&self, other: &InvalidUtf8Slice) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &InvalidUtf8Slice) -> bool
[src]
fn ne(&self, other: &InvalidUtf8Slice) -> bool
This method tests for !=
.
impl Eq for InvalidUtf8Slice
[src]
impl Eq for InvalidUtf8Slice
impl From<InvalidUtf8> for InvalidUtf8Slice
[src]
impl From<InvalidUtf8> for InvalidUtf8Slice
fn from(error: InvalidUtf8) -> InvalidUtf8Slice
[src]
fn from(error: InvalidUtf8) -> InvalidUtf8Slice
Performs the conversion.
impl From<InvalidCodepoint> for InvalidUtf8Slice
[src]
impl From<InvalidCodepoint> for InvalidUtf8Slice
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
[src]
fn from(error: InvalidCodepoint) -> InvalidUtf8Slice
Performs the conversion.
impl Error for InvalidUtf8Slice
[src]
impl Error for InvalidUtf8Slice
fn description(&self) -> &'static str
[src]
fn description(&self) -> &'static str
This method is soft-deprecated. Read more
fn cause(&self) -> Option<&Error>
[src]
fn cause(&self) -> Option<&Error>
The lower-level cause of this error, if any. Read more
impl Display for InvalidUtf8Slice
[src]
impl Display for InvalidUtf8Slice
Auto Trait Implementations
impl Send for InvalidUtf8Slice
impl Send for InvalidUtf8Slice
impl Sync for InvalidUtf8Slice
impl Sync for InvalidUtf8Slice