Struct compact_str::Utf16Error
source · pub struct Utf16Error(_);
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 RefUnwindSafe for Utf16Error
impl Send for Utf16Error
impl Sync for Utf16Error
impl Unpin for Utf16Error
impl UnwindSafe for Utf16Error
Blanket Implementations§
source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
source§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<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere
W: DeserializeWith<F, T, D>,
D: Fallible + ?Sized,
F: ?Sized,
impl<F, W, T, D> Deserialize<With<T, W>, D> for Fwhere W: DeserializeWith<F, T, D>, D: Fallible + ?Sized, F: ?Sized,
source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere T: Display,
source§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString
. Read more