#[non_exhaustive]pub enum GenericEncodeError {
BadBorrow(BorrowError),
LargeIsize(IsizeEncodeError),
LargeUsize(UsizeEncodeError),
}
Expand description
A generic encoding error type.
The intended use of this type is by derived implementations of crate::encode::Encode
.
Manual implementors are recommended to use a custom or less generic type for the sake of efficiency.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
BadBorrow(BorrowError)
A RefCell
object could not be borrowed.
LargeIsize(IsizeEncodeError)
An isize
object was outside the allowed domain.
LargeUsize(UsizeEncodeError)
A usize
object was outside the allowed domain.
Trait Implementations§
Source§impl Debug for GenericEncodeError
impl Debug for GenericEncodeError
Source§impl Display for GenericEncodeError
impl Display for GenericEncodeError
Source§impl Error for GenericEncodeError
impl Error for GenericEncodeError
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<BorrowError> for GenericEncodeError
impl From<BorrowError> for GenericEncodeError
Source§fn from(value: BorrowError) -> Self
fn from(value: BorrowError) -> Self
Converts to this type from the input type.
Source§impl<L, I> From<CollectionEncodeError<L, I>> for GenericEncodeError
impl<L, I> From<CollectionEncodeError<L, I>> for GenericEncodeError
Source§fn from(value: CollectionEncodeError<L, I>) -> Self
fn from(value: CollectionEncodeError<L, I>) -> Self
Converts to this type from the input type.
Source§impl<D, F> From<EnumEncodeError<D, F>> for GenericEncodeError
impl<D, F> From<EnumEncodeError<D, F>> for GenericEncodeError
Source§fn from(value: EnumEncodeError<D, F>) -> Self
fn from(value: EnumEncodeError<D, F>) -> Self
Converts to this type from the input type.
Source§impl From<Infallible> for GenericEncodeError
impl From<Infallible> for GenericEncodeError
Source§fn from(_value: Infallible) -> Self
fn from(_value: Infallible) -> Self
Converts to this type from the input type.
Source§impl From<IsizeEncodeError> for GenericEncodeError
impl From<IsizeEncodeError> for GenericEncodeError
Source§fn from(value: IsizeEncodeError) -> Self
fn from(value: IsizeEncodeError) -> Self
Converts to this type from the input type.
Source§impl<I, E: Into<Self>> From<ItemEncodeError<I, E>> for GenericEncodeError
impl<I, E: Into<Self>> From<ItemEncodeError<I, E>> for GenericEncodeError
Source§fn from(value: ItemEncodeError<I, E>) -> Self
fn from(value: ItemEncodeError<I, E>) -> Self
Converts to this type from the input type.
Source§impl From<UsizeEncodeError> for GenericEncodeError
impl From<UsizeEncodeError> for GenericEncodeError
Source§fn from(value: UsizeEncodeError) -> Self
fn from(value: UsizeEncodeError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for GenericEncodeError
impl PartialEq for GenericEncodeError
impl Eq for GenericEncodeError
Auto Trait Implementations§
impl Freeze for GenericEncodeError
impl RefUnwindSafe for GenericEncodeError
impl Send for GenericEncodeError
impl Sync for GenericEncodeError
impl Unpin for GenericEncodeError
impl UnwindSafe for GenericEncodeError
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