#[non_exhaustive]pub enum SinkError {
Io,
Capacity,
Closed,
Other,
}Expand description
Opaque error returned by crate::Sink implementations.
Backends map their internal failures to one of a small set of categories. Categories are deliberately coarse: callers either retry the write or surface the audit failure upstream.
§Example
use audit_trail::SinkError;
let err = SinkError::Io;
assert_eq!(err.to_string(), "sink i/o failure");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
Underlying I/O failure (disk, socket, etc.).
Capacity
Sink has reached its capacity and cannot accept more records.
Closed
Sink has been closed and will accept no further writes.
Other
Sink-specific failure not covered by the other variants.
Trait Implementations§
Source§impl Error for SinkError
Available on crate feature std only.
impl Error for SinkError
Available on crate feature
std 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()
impl Copy for SinkError
impl Eq for SinkError
impl StructuralPartialEq for SinkError
Auto Trait Implementations§
impl Freeze for SinkError
impl RefUnwindSafe for SinkError
impl Send for SinkError
impl Sync for SinkError
impl Unpin for SinkError
impl UnsafeUnpin for SinkError
impl UnwindSafe for SinkError
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