#[non_exhaustive]pub enum CountedWriteError<E> {
Encoding(OneShotError),
Sink {
error: E,
committed: usize,
},
WriteZero {
committed: usize,
},
InvalidCount {
reported: usize,
offered: usize,
committed: usize,
},
Backend {
fault: BackendFault,
committed: usize,
},
}Expand description
Failure from exact-progress counted-sink encoding.
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.
Encoding(OneShotError)
Encoding preflight failed before the sink was called.
Sink
The sink rejected a call without accepting bytes from that call.
Fields
§
error: ESink-specific error.
WriteZero
The sink accepted zero bytes from a non-empty call.
InvalidCount
The sink violated its count contract.
Fields
Backend
A validated internal output invariant failed.
Fields
§
fault: BackendFaultInternal backend failure classification.
Implementations§
Trait Implementations§
Source§impl<E: Debug> Debug for CountedWriteError<E>
impl<E: Debug> Debug for CountedWriteError<E>
Source§impl<E: Display> Display for CountedWriteError<E>
impl<E: Display> Display for CountedWriteError<E>
Source§impl<E: Error + 'static> Error for CountedWriteError<E>
Available on crate feature std only.
impl<E: Error + 'static> Error for CountedWriteError<E>
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()
Auto Trait Implementations§
impl<E> Freeze for CountedWriteError<E>where
E: Freeze,
impl<E> RefUnwindSafe for CountedWriteError<E>where
E: RefUnwindSafe,
impl<E> Send for CountedWriteError<E>where
E: Send,
impl<E> Sync for CountedWriteError<E>where
E: Sync,
impl<E> Unpin for CountedWriteError<E>where
E: Unpin,
impl<E> UnsafeUnpin for CountedWriteError<E>where
E: UnsafeUnpin,
impl<E> UnwindSafe for CountedWriteError<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