pub enum ConversionError<NE> {
Nul(NE),
InvalidChar(Utf8Error),
InvalidUChar16(FromUtf16Error),
InvalidUChar32(FromUtf32Error),
}
Expand description
An error description while converting strings
Variants§
Trait Implementations§
Source§impl<NE: Debug> Debug for ConversionError<NE>
impl<NE: Debug> Debug for ConversionError<NE>
Source§impl<NE: Display> Display for ConversionError<NE>
impl<NE: Display> Display for ConversionError<NE>
Source§impl<NE: Error> Error for ConversionError<NE>
impl<NE: Error> Error for ConversionError<NE>
Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§impl<NE> From<FromUtf16Error> for ConversionError<NE>
impl<NE> From<FromUtf16Error> for ConversionError<NE>
Source§fn from(e: FromUtf16Error) -> Self
fn from(e: FromUtf16Error) -> Self
Converts to this type from the input type.
Source§impl<NE> From<FromUtf32Error> for ConversionError<NE>
impl<NE> From<FromUtf32Error> for ConversionError<NE>
Source§fn from(e: FromUtf32Error) -> Self
fn from(e: FromUtf32Error) -> Self
Converts to this type from the input type.
Source§impl<U: UChar> From<NulError<U>> for ConversionError<NulError<U>>
impl<U: UChar> From<NulError<U>> for ConversionError<NulError<U>>
Source§fn from(e: WideNulError<U>) -> Self
fn from(e: WideNulError<U>) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl<NE> Freeze for ConversionError<NE>where
NE: Freeze,
impl<NE> RefUnwindSafe for ConversionError<NE>where
NE: RefUnwindSafe,
impl<NE> Send for ConversionError<NE>where
NE: Send,
impl<NE> Sync for ConversionError<NE>where
NE: Sync,
impl<NE> Unpin for ConversionError<NE>where
NE: Unpin,
impl<NE> UnwindSafe for ConversionError<NE>where
NE: UnwindSafe,
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