pub enum LogError {
Io(Error),
Format {
line: u64,
message: String,
},
Schema {
found: u32,
supported: u32,
},
}Expand description
Why a log could not be written or read.
§Examples
use brokapi_runtime::record::{EnvelopeReader, LogError};
let err = EnvelopeReader::new(&b"not a log\n"[..]).err().expect("refused");
assert!(matches!(err, LogError::Format { line: 1, .. }));Variants§
Io(Error)
The file or the stream failed. Check the disk and the path.
Format
A line is not what the format says. The file is damaged or is not a brokapi log. line counts
from 1, the header is line 1.
Schema
The file was written by a newer version. Update the library to read it.
Trait Implementations§
Source§impl Error for LogError
impl Error for LogError
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 !RefUnwindSafe for LogError
impl !UnwindSafe for LogError
impl Freeze for LogError
impl Send for LogError
impl Sync for LogError
impl Unpin for LogError
impl UnsafeUnpin for LogError
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