Enum encode_unicode::error::InvalidUtf8 [−][src]
pub enum InvalidUtf8 { FirstByte(InvalidUtf8FirstByte), NotAContinuationByte(usize), OverLong, }
Reasons why a byte sequence is not valid UTF-8, excluding invalid codepoint. In sinking precedence.
Variants
FirstByte(InvalidUtf8FirstByte)
Something is wrong with the first byte.
NotAContinuationByte(usize)
Thee byte at index 1...3 should be a continuation byte, but dosesn't fit the pattern 0b10xx_xxxx.
OverLong
There are too many leading zeros: it could be a byte shorter.
Trait Implementations
impl Clone for InvalidUtf8
[src]
impl Clone for InvalidUtf8
fn clone(&self) -> InvalidUtf8
[src]
fn clone(&self) -> InvalidUtf8
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)
Performs copy-assignment from source
. Read more
impl Copy for InvalidUtf8
[src]
impl Copy for InvalidUtf8
impl Debug for InvalidUtf8
[src]
impl Debug for InvalidUtf8
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 InvalidUtf8
[src]
impl PartialEq for InvalidUtf8
fn eq(&self, other: &InvalidUtf8) -> bool
[src]
fn eq(&self, other: &InvalidUtf8) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &InvalidUtf8) -> bool
[src]
fn ne(&self, other: &InvalidUtf8) -> bool
This method tests for !=
.
impl Eq for InvalidUtf8
[src]
impl Eq for InvalidUtf8
impl From<InvalidUtf8FirstByte> for InvalidUtf8
[src]
impl From<InvalidUtf8FirstByte> for InvalidUtf8
fn from(error: InvalidUtf8FirstByte) -> InvalidUtf8
[src]
fn from(error: InvalidUtf8FirstByte) -> InvalidUtf8
Performs the conversion.
impl Error for InvalidUtf8
[src]
impl Error for InvalidUtf8
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>
Returns Some
if the error is a InvalidUtf8FirstByte
.
impl Display for InvalidUtf8
[src]
impl Display for InvalidUtf8
fn fmt(&self, fmtr: &mut Formatter) -> Result
[src]
fn fmt(&self, fmtr: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl From<InvalidUtf8> for InvalidUtf8Array
[src]
impl From<InvalidUtf8> for InvalidUtf8Array
fn from(error: InvalidUtf8) -> InvalidUtf8Array
[src]
fn from(error: InvalidUtf8) -> InvalidUtf8Array
Performs the conversion.
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.
Auto Trait Implementations
impl Send for InvalidUtf8
impl Send for InvalidUtf8
impl Sync for InvalidUtf8
impl Sync for InvalidUtf8