pub struct Utf16Error(/* private fields */);
Expand description
A possible error value when converting a CompactString
from a UTF-16 byte slice.
This type is the error type for the from_utf16
method on CompactString
.
ยงExamples
Basic usage:
// ๐mu<invalid>ic
let v = &[0xD834, 0xDD1E, 0x006d, 0x0075,
0xD800, 0x0069, 0x0063];
assert!(CompactString::from_utf16(v).is_err());
Trait Implementationsยง
Sourceยงimpl Clone for Utf16Error
impl Clone for Utf16Error
Sourceยงfn clone(&self) -> Utf16Error
fn clone(&self) -> Utf16Error
Returns a copy of the value. Read more
1.0.0 ยท Sourceยงfn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSourceยงimpl Debug for Utf16Error
impl Debug for Utf16Error
Sourceยงimpl Display for Utf16Error
impl Display for Utf16Error
impl Copy for Utf16Error
Auto Trait Implementationsยง
impl Freeze for Utf16Error
impl RefUnwindSafe for Utf16Error
impl Send for Utf16Error
impl Sync for Utf16Error
impl Unpin for Utf16Error
impl UnwindSafe for Utf16Error
Blanket Implementationsยง
Sourceยงimpl<T> AsCleanDebug for Twhere
T: Display,
impl<T> AsCleanDebug for Twhere
T: Display,
Sourceยงfn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
fn as_clean(&self) -> CleanDebug<'_, Self>where
Self: Display,
Get a
CleanDebug
for Self. Read moreSourceยงimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Sourceยงfn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Sourceยงimpl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Sourceยงimpl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Sourceยงfn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string()
Read moreSourceยงfn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more