Struct FromUtf16Error

struct FromUtf16Error(_)

A possible error value when converting a String from a UTF-16 byte slice.

This type is the error type for the from_utf16 method on String.

Examples

// 𝄞mu<invalid>ic
let v = &[0xD834, 0xDD1E, 0x006d, 0x0075,
          0xD800, 0x0069, 0x0063];

assert!(String::from_utf16(v).is_err());

Implementations

impl Debug for FromUtf16Error

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

impl Display for FromUtf16Error

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

impl Error for FromUtf16Error

impl Freeze for FromUtf16Error

impl RefUnwindSafe for FromUtf16Error

impl Send for FromUtf16Error

impl Sync for FromUtf16Error

impl Unpin for FromUtf16Error

impl UnsafeUnpin for FromUtf16Error

impl UnwindSafe for FromUtf16Error

impl<T> Any for FromUtf16Error

fn type_id(self: &Self) -> TypeId

impl<T> Borrow for FromUtf16Error

fn borrow(self: &Self) -> &T

impl<T> BorrowMut for FromUtf16Error

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

impl<T> From for FromUtf16Error

fn from(t: T) -> T

Returns the argument unchanged.

impl<T> ToString for FromUtf16Error

fn to_string(self: &Self) -> String

impl<T, U> Into for FromUtf16Error

fn into(self: Self) -> U

Calls U::from(self).

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

impl<T, U> TryFrom for FromUtf16Error

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

impl<T, U> TryInto for FromUtf16Error

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