pub enum UnicodeEncodingError {
    NoError,
    InvalidCodepointTooManyBits,
    InvalidUtf8Prefix,
    IncoherentUtf8Codepoint,
    InvalidStreamSize,
    AmbiguousUnpairedSurrogates,
    UnpairedSurrogateNotification,
    MissingEncodedBytes,
}

Variants§

§

NoError

Indicate an absence of error from a function checking for errors.

§

InvalidCodepointTooManyBits

Indicate that bits above the 21th bit in a code-point are not empty. This means that the code-point is invalid.

§

InvalidUtf8Prefix

Indicate that a byte in an UTF-8 stream of bytes does not start with a valid prefix. This might means that the data are not encoded in UTF-8…

§

IncoherentUtf8Codepoint

Indicate that the number of bytes in a glyph is not coherent with the prefix used in the first byte if the glyph.

§

InvalidStreamSize

Indicate that there is not the right numbers of bytes in a stream of input bytes. For example, an input that should have been UTF-32 does not contain a number of bytes that is a multiple of 4.

§

AmbiguousUnpairedSurrogates

Two code-points that would be unpaired surrogates as UTF-16 are next to each others, thus this would be ambiguous ti use as UTF-16.

§

UnpairedSurrogateNotification

Used internally to managed unpaired surrogate.

§

MissingEncodedBytes

For variable length encoding such as UTF-8, there is not enough bytes to finish a glyph.

Trait Implementations§

source§

impl Debug for UnicodeEncodingError

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.