pub enum TryFromBytesError {
Utf8(Utf8Error),
Length(TryFromStrError),
}Expand description
Try from bytes error can occur when trying to convert a byte slice ([u8]) to a crate::Char.
Variants§
Utf8(Utf8Error)
The bytes are not valid UTF-8. See Utf8Error.
Length(TryFromStrError)
The bytes do not contain exactly one UTF-8 encoded character. See TryFromStrError.
Trait Implementations§
Source§impl Clone for TryFromBytesError
impl Clone for TryFromBytesError
Source§fn clone(&self) -> TryFromBytesError
fn clone(&self) -> TryFromBytesError
Returns a duplicate 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 TryFromBytesError
impl Debug for TryFromBytesError
Source§impl Display for TryFromBytesError
impl Display for TryFromBytesError
Source§impl Error for TryFromBytesError
Available on crate feature std only.
impl Error for TryFromBytesError
Available on crate feature
std only.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<TryFromStrError> for TryFromBytesError
impl From<TryFromStrError> for TryFromBytesError
Source§fn from(value: TryFromStrError) -> Self
fn from(value: TryFromStrError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for TryFromBytesError
impl From<Utf8Error> for TryFromBytesError
Source§impl PartialEq for TryFromBytesError
impl PartialEq for TryFromBytesError
impl Copy for TryFromBytesError
impl Eq for TryFromBytesError
impl StructuralPartialEq for TryFromBytesError
Auto Trait Implementations§
impl Freeze for TryFromBytesError
impl RefUnwindSafe for TryFromBytesError
impl Send for TryFromBytesError
impl Sync for TryFromBytesError
impl Unpin for TryFromBytesError
impl UnwindSafe for TryFromBytesError
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