pub enum AuditError {
Io {
path: String,
source: Error,
},
Malformed {
line: usize,
source: Error,
},
Frame {
path: String,
detail: String,
},
Unframed {
path: String,
why: String,
},
NotOriginated {
path: String,
},
Broken {
seq: u64,
line: usize,
what: String,
},
}Expand description
What went wrong with the chain.
Variants§
Io
The file could not be read, created or written.
Malformed
A line in the file is not an entry.
Frame
The line could not be framed into the transaction log, so it was not written down at all. Deliberately not best-effort: a trail whose file and whose log disagree is worse than one missing entry, because the missing entry is announced and the disagreement is not.
Unframed
This chain was asked to be the REPLICATED trail and cannot be
(AuditChain::open_framed). Never silent: the caller says so out
loud and opens an unframed chain instead.
NotOriginated
The box FOLLOWS (a twin, or a box being restored): it originates nothing into the
replicated trail it holds for its primary, so nothing was written (Recorded::NotOriginated
through AuditChain::append). Not a fault: the caller’s log line is the record.
Broken
The chain does not hold. This is the finding, not a fault.
Trait Implementations§
Source§impl Debug for AuditError
impl Debug for AuditError
Source§impl Display for AuditError
impl Display for AuditError
Source§impl Error for AuditError
impl Error for AuditError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()