Struct astral_string::Utf16Error
pub struct Utf16Error { /* private fields */ }
Expand description
A possible error value when converting a Name
or Text
from an UTF-16 byte slice.
This type is the error type for the from_utf16
method on Name
or Text
.
Example
use astral::string::Name;
// 𝄞mu<invalid>ic
let v = &[0xD834, 0xDD1E, 0x006d, 0x0075,
0xD800, 0x0069, 0x0063];
assert!(Name::from_utf16(v, &string_subsystem).is_err());
Trait Implementations
impl Debug for Utf16Error
impl Debug for Utf16Error
impl Display for Utf16Error
impl Display for Utf16Error
impl Error for Utf16Error
impl Error for Utf16Error
1.30.0 · sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0 · sourcefn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations
impl RefUnwindSafe for Utf16Error
impl Send for Utf16Error
impl Sync for Utf16Error
impl Unpin for Utf16Error
impl UnwindSafe for Utf16Error
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more