Struct alloc::string::FromUtf16Error1.0.0[−][src]

pub struct FromUtf16Error(_);
Expand description

从 UTF-16 字节切片转换 String 时可能的错误值。

该类型是 String 上 from_utf16 方法的错误类型。

Examples

基本用法:

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

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

Trait Implementations

使用给定的格式化程序格式化该值。 Read more

使用给定的格式化程序格式化该值。 Read more

Auto Trait Implementations

Blanket Implementations

获取 self 的 TypeId。 Read more

从拥有的值中一成不变地借用。 Read more

从拥有的值中借用。 Read more

执行转换。

执行转换。

将给定值转换为 String。 Read more

发生转换错误时返回的类型。

执行转换。

发生转换错误时返回的类型。

执行转换。