pub enum DuplicateDrainFlushError {
Left(FlushError),
Right(FlushError),
Both(FlushError, FlushError),
}
Expand description
An error from calling Duplicate::flush
.
This means that at least one of the drains has failed to flush.
Variants§
Left(FlushError)
Occurs when calling Drain::flush
the left (first) drain of Duplicate
fails,
but flushing the right drain succeeds.
Right(FlushError)
Occurs when calling Drain::flush
the right (second) drain of Duplicate
fails,
but flushing the left drain succeeds.
Both(FlushError, FlushError)
Occurs when calling Drain::flush
fails for both the left and right
(first and second) drains of Duplicate
.
Implementations§
Source§impl DuplicateDrainFlushError
impl DuplicateDrainFlushError
Sourcepub fn left(&self) -> Option<&FlushError>
pub fn left(&self) -> Option<&FlushError>
If flushing the left drain triggered an error, then return it.
Returns None
if flushing the left drain did not cause an error.
Sourcepub fn right(&self) -> Option<&FlushError>
pub fn right(&self) -> Option<&FlushError>
If flushing the right drain triggered an error, then return it.
Returns None
if flushing the right drain did not cause an error.
Trait Implementations§
Source§impl Debug for DuplicateDrainFlushError
impl Debug for DuplicateDrainFlushError
Source§impl Display for DuplicateDrainFlushError
impl Display for DuplicateDrainFlushError
Source§impl Error for DuplicateDrainFlushError
Available on has_std_error
only.
impl Error for DuplicateDrainFlushError
Available on
has_std_error
only.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()
Auto Trait Implementations§
impl Freeze for DuplicateDrainFlushError
impl !RefUnwindSafe for DuplicateDrainFlushError
impl Send for DuplicateDrainFlushError
impl Sync for DuplicateDrainFlushError
impl Unpin for DuplicateDrainFlushError
impl !UnwindSafe for DuplicateDrainFlushError
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