pub enum AnchorVerifyError {
Jsonl(JsonlError),
EmptyLedger {
path: PathBuf,
},
InternalAnchorBuild {
path: PathBuf,
source: AnchorParseError,
},
ChainBroken {
path: PathBuf,
line: usize,
reason: String,
},
Truncated {
path: PathBuf,
db_count: u64,
anchor_event_count: u64,
},
MissingPosition {
path: PathBuf,
anchor_event_count: u64,
},
PositionHashMismatch {
path: PathBuf,
event_count: u64,
observed: String,
expected: String,
},
}Expand description
Verification errors for an anchor checked against a JSONL ledger.
Variants§
Jsonl(JsonlError)
The ledger could not be opened, decoded, or scanned.
EmptyLedger
The ledger had no event rows to bind an anchor to.
InternalAnchorBuild
The verifier produced fields that did not satisfy the anchor format.
Fields
§
source: AnchorParseErrorAnchor validation failure.
ChainBroken
The ledger hash chain itself is invalid.
Fields
Truncated
Current ledger is shorter than the anchored position.
Fields
MissingPosition
The anchor names a position that has no event hash, such as zero.
Fields
PositionHashMismatch
Recomputed hash at the anchored position did not match the anchor.
Trait Implementations§
Source§impl Debug for AnchorVerifyError
impl Debug for AnchorVerifyError
Source§impl Display for AnchorVerifyError
impl Display for AnchorVerifyError
Source§impl Error for AnchorVerifyError
impl Error for AnchorVerifyError
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()
Source§impl From<JsonlError> for AnchorVerifyError
impl From<JsonlError> for AnchorVerifyError
Source§fn from(source: JsonlError) -> Self
fn from(source: JsonlError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for AnchorVerifyError
impl !RefUnwindSafe for AnchorVerifyError
impl Send for AnchorVerifyError
impl Sync for AnchorVerifyError
impl Unpin for AnchorVerifyError
impl UnsafeUnpin for AnchorVerifyError
impl !UnwindSafe for AnchorVerifyError
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