Struct DecodeUtf16Error
pub struct DecodeUtf16Error { pub(in ::char::decode) code: u16 }
An error that can be returned when decoding UTF-16 code points.
This struct is created when using the DecodeUtf16 type.
Fields
code: u16
Implementations
impl DecodeUtf16Error
fn unpaired_surrogate(&self) -> u16Returns the unpaired surrogate which caused this error.
Trait Implementations
impl Clone for DecodeUtf16Error
fn clone(&self) -> DecodeUtf16Error
impl Debug for DecodeUtf16Error
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Display for DecodeUtf16Error
fn fmt(&self, f: &mut Formatter<'_>) -> Result
impl Eq for DecodeUtf16Error
fn assert_fields_are_eq(&self)
impl Error for DecodeUtf16Error
impl PartialEq for DecodeUtf16Error
fn eq(&self, other: &DecodeUtf16Error) -> bool
impl StructuralPartialEq for DecodeUtf16Error
Auto Trait Implementations
impl Freeze for DecodeUtf16Error
impl RefUnwindSafe for DecodeUtf16Error
impl Send for DecodeUtf16Error
impl Sync for DecodeUtf16Error
impl Unpin for DecodeUtf16Error
impl UnsafeUnpin for DecodeUtf16Error
impl UnwindSafe for DecodeUtf16Error
Blanket Implementations
impl<T> Any for DecodeUtf16Error
where
T: 'static + ?Sized,
fn type_id(&self) -> TypeId
impl<T> Borrow<T> for DecodeUtf16Error
where
T: ?Sized,
fn borrow(&self) -> &T
impl<T> BorrowMut<T> for DecodeUtf16Error
where
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
impl<T> CloneToUninit for DecodeUtf16Error
where
T: Clone,
unsafe fn clone_to_uninit(&self, dest: *mut u8)
impl<T> From<T> for DecodeUtf16Error
fn from(t: T) -> TReturns the argument unchanged.
impl<T> SizeHint for DecodeUtf16Error
where
T: ?Sized,
fn lower_bound(&self) -> usizefn upper_bound(&self) -> Option<usize>
impl<T> SizedTypeProperties for DecodeUtf16Error
impl<T, U> Into<U> for DecodeUtf16Error
where
U: From<T>,
fn into(self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom<U> for DecodeUtf16Error
where
U: Into<T>,
type Error = Infallible;fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto<U> for DecodeUtf16Error
where
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error;fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>