pub enum FromUtf16Error {
Capacity(CapacityError),
DecodeUtf16(DecodeUtf16Error),
}
Expand description
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
.
Variants§
Capacity(CapacityError)
The capacity of the String
is too small for the given operation.
DecodeUtf16(DecodeUtf16Error)
Error decoding UTF-16.
Trait Implementations§
Source§impl Debug for FromUtf16Error
impl Debug for FromUtf16Error
Source§impl Display for FromUtf16Error
impl Display for FromUtf16Error
Source§impl Error for FromUtf16Error
impl Error for FromUtf16Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<CapacityError> for FromUtf16Error
impl From<CapacityError> for FromUtf16Error
Source§fn from(e: CapacityError) -> Self
fn from(e: CapacityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for FromUtf16Error
impl RefUnwindSafe for FromUtf16Error
impl Send for FromUtf16Error
impl Sync for FromUtf16Error
impl Unpin for FromUtf16Error
impl UnwindSafe for FromUtf16Error
Blanket Implementations§
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