Enum encode_unicode::error::InvalidUtf8 [−][src]
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)
The byte at index 1…3 should be a continuation byte, but dosesn’t fit the pattern 0b10xx_xxxx.
There are too many leading zeros: it could be a byte shorter.
Trait Implementations
impl Clone for InvalidUtf8
[src]
fn clone(&self) -> InvalidUtf8
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for InvalidUtf8
[src]
impl Debug for InvalidUtf8
[src]
impl Display for InvalidUtf8
[src]
impl Eq for InvalidUtf8
[src]
impl Error for InvalidUtf8
[src]
fn description(&self) -> &'static str
[src]
fn cause(&self) -> Option<&dyn Error>
[src]
👎 Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
Returns Some
if the error is a InvalidUtf8FirstByte
.
pub fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0[src]
pub fn backtrace(&self) -> Option<&Backtrace>
[src]
impl From<InvalidUtf8> for InvalidUtf8Array
[src]
fn from(error: InvalidUtf8) -> InvalidUtf8Array
[src]
impl From<InvalidUtf8> for InvalidUtf8Slice
[src]
fn from(error: InvalidUtf8) -> InvalidUtf8Slice
[src]
impl From<InvalidUtf8FirstByte> for InvalidUtf8
[src]
fn from(error: InvalidUtf8FirstByte) -> InvalidUtf8
[src]
impl PartialEq<InvalidUtf8> for InvalidUtf8
[src]
fn eq(&self, other: &InvalidUtf8) -> bool
[src]
fn ne(&self, other: &InvalidUtf8) -> bool
[src]
impl StructuralEq for InvalidUtf8
[src]
impl StructuralPartialEq for InvalidUtf8
[src]
Auto Trait Implementations
impl RefUnwindSafe for InvalidUtf8
impl Send for InvalidUtf8
impl Sync for InvalidUtf8
impl Unpin for InvalidUtf8
impl UnwindSafe for InvalidUtf8
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,