pub enum CodecEncodeError<E> {
Encode {
source: E,
input_index: usize,
},
InvalidInputIndex {
index: usize,
len: usize,
},
InvalidOutputIndex {
index: usize,
len: usize,
},
}Expand description
Error reported by codec-backed buffered encoder adapters.
The wrapped codec remains responsible for domain-specific encode failures. This type adds adapter-level failures that cannot be represented by the wrapped codec itself, such as a buffered encoder receiving an invalid input or output start index.
Variants§
Encode
The wrapped codec reported an encode error.
Fields
§
source: EError returned by the wrapped codec.
InvalidInputIndex
The caller supplied an input index outside the input slice.
Fields
InvalidOutputIndex
The caller supplied an output index outside the output slice.
Implementations§
Source§impl<E> CodecEncodeError<E>
impl<E> CodecEncodeError<E>
Trait Implementations§
Source§impl<E: Clone> Clone for CodecEncodeError<E>
impl<E: Clone> Clone for CodecEncodeError<E>
Source§fn clone(&self) -> CodecEncodeError<E>
fn clone(&self) -> CodecEncodeError<E>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl<E: Copy> Copy for CodecEncodeError<E>
Source§impl<E: Debug> Debug for CodecEncodeError<E>
impl<E: Debug> Debug for CodecEncodeError<E>
Source§impl<E> Display for CodecEncodeError<E>where
E: Display,
impl<E> Display for CodecEncodeError<E>where
E: Display,
impl<E: Eq> Eq for CodecEncodeError<E>
Source§impl<E> Error for CodecEncodeError<E>
impl<E> Error for CodecEncodeError<E>
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<E: Hash> Hash for CodecEncodeError<E>
impl<E: Hash> Hash for CodecEncodeError<E>
Source§impl<E: PartialEq> PartialEq for CodecEncodeError<E>
impl<E: PartialEq> PartialEq for CodecEncodeError<E>
Source§fn eq(&self, other: &CodecEncodeError<E>) -> bool
fn eq(&self, other: &CodecEncodeError<E>) -> bool
Tests for
self and other values to be equal, and is used by ==.impl<E> StructuralPartialEq for CodecEncodeError<E>
Auto Trait Implementations§
impl<E> Freeze for CodecEncodeError<E>where
E: Freeze,
impl<E> RefUnwindSafe for CodecEncodeError<E>where
E: RefUnwindSafe,
impl<E> Send for CodecEncodeError<E>where
E: Send,
impl<E> Sync for CodecEncodeError<E>where
E: Sync,
impl<E> Unpin for CodecEncodeError<E>where
E: Unpin,
impl<E> UnsafeUnpin for CodecEncodeError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for CodecEncodeError<E>where
E: 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