#[non_exhaustive]pub enum FlushError {
Io(Error),
NotSupported,
Custom(Box<dyn StdError + Send + Sync + 'static>),
Duplicate(Box<DuplicateDrainFlushError>),
}
Expand description
An error that occurs when calling Drain::flush
.
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.
Io(Error)
An error that occurs doing IO.
Often triggered by std::io::Write::flush
NotSupported
Indicates this drain does not support flushing.
Custom(Box<dyn StdError + Send + Sync + 'static>)
A custom error, which is not directly caused by IO or FlushError::NotSupported
.
Duplicate(Box<DuplicateDrainFlushError>)
An error caused by calling slog::Duplicate::flush
.
Trait Implementations§
Source§impl Debug for FlushError
impl Debug for FlushError
Source§impl Display for FlushError
impl Display for FlushError
Source§impl Error for FlushError
Available on has_std_error
only.
impl Error for FlushError
Available on
has_std_error
only.Source§fn source(&self) -> Option<&(dyn StdError + 'static)>
fn source(&self) -> Option<&(dyn StdError + '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 FlushError
impl !RefUnwindSafe for FlushError
impl Send for FlushError
impl Sync for FlushError
impl Unpin for FlushError
impl !UnwindSafe for FlushError
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