pub enum WriteError<S, E> {
Sink(S),
Source(E),
}Expand description
Why write() failed. The sink may hold part of a file.
As an error, Sink says the sink failed and gives the sink’s error as its source, and
Source stands for the source’s error itself, so a report of the chain names each cause
once. A sink error that is not an Error is only in the variant.
Variants§
Sink(S)
The sink’s own error.
Source(E)
The source’s error, or an encoder Error the source passed on.
Trait Implementations§
impl<S: Copy, E: Copy> Copy for WriteError<S, E>
Source§impl<S, E: Display> Display for WriteError<S, E>
impl<S, E: Display> Display for WriteError<S, E>
impl<S: Eq, E: Eq> Eq for WriteError<S, E>
Source§impl<S, E> Error for WriteError<S, E>
impl<S, E> Error for WriteError<S, 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()
impl<S: PartialEq, E: PartialEq> StructuralPartialEq for WriteError<S, E>
Auto Trait Implementations§
impl<S, E> Forget for WriteError<S, E>
impl<S, E> Freeze for WriteError<S, E>
impl<S, E> Move for WriteError<S, E>
impl<S, E> RefUnwindSafe for WriteError<S, E>where
S: RefUnwindSafe,
E: RefUnwindSafe,
impl<S, E> Send for WriteError<S, E>
impl<S, E> Sync for WriteError<S, E>
impl<S, E> Unpin for WriteError<S, E>
impl<S, E> UnsafeUnpin for WriteError<S, E>where
S: UnsafeUnpin,
E: UnsafeUnpin,
impl<S, E> UnwindSafe for WriteError<S, E>where
S: UnwindSafe,
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