pub enum FromBytesError {
InvalidUtf8(Utf8Error),
TooLarge(TryPutError),
}Expand description
Error type for converting a raw byte slice into a fixed-capacity UTF-8 buffer. Combines UTF-8 validation and capacity errors.
Variants§
InvalidUtf8(Utf8Error)
The bytes are not valid UTF-8.
TooLarge(TryPutError)
The bytes do not fit in the buffer’s capacity.
Trait Implementations§
Source§impl Debug for FromBytesError
impl Debug for FromBytesError
Source§impl Display for FromBytesError
impl Display for FromBytesError
impl Eq for FromBytesError
Source§impl Error for FromBytesError
impl Error for FromBytesError
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<FromBytesError> for Error
Available on crate feature std only.
impl From<FromBytesError> for Error
Available on crate feature
std only.Source§fn from(value: FromBytesError) -> Self
fn from(value: FromBytesError) -> Self
Converts to this type from the input type.
Source§impl From<TryPutError> for FromBytesError
impl From<TryPutError> for FromBytesError
Source§fn from(e: TryPutError) -> Self
fn from(e: TryPutError) -> Self
Converts to this type from the input type.
Source§impl From<Utf8Error> for FromBytesError
impl From<Utf8Error> for FromBytesError
Source§impl PartialEq for FromBytesError
impl PartialEq for FromBytesError
impl StructuralPartialEq for FromBytesError
Auto Trait Implementations§
impl Freeze for FromBytesError
impl RefUnwindSafe for FromBytesError
impl Send for FromBytesError
impl Sync for FromBytesError
impl Unpin for FromBytesError
impl UnsafeUnpin for FromBytesError
impl UnwindSafe for FromBytesError
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