pub enum OtsError {
UnknownTag {
observed: [u8; 8],
},
MalformedHeader {
reason: String,
},
UnknownCommitmentOp {
tag: u8,
},
EmptyProof,
OtsCrateError(String),
}Expand description
Errors emitted by the OtsParser trait surface.
Errors are split by origin: parser-internal violations
([MalformedHeader], [UnknownCommitmentOp], [EmptyProof]) versus
whitelist violations ([UnknownTag]) versus everything else that
surfaced inside the opentimestamps crate ([OtsCrateError]). The
split matters because [UnknownTag] is the hostile-upstream
containment edge — the trait wrapper rejects it even when the
upstream crate accepted the bytes.
Variants§
UnknownTag
Tag stored in the attestation was not on the whitelist (Bitcoin / Pending only).
MalformedHeader
Magic, version, or digest-type framing did not parse as a valid
DetachedTimestampFile.
UnknownCommitmentOp
A commitment-op tag inside the timestamp walk was not one of the
upstream-recognized ops. Wrapped here so downstream surfaces see
a stable type rather than the upstream Error variant.
EmptyProof
Input bytes were empty. The wrapper rejects this before invoking
the upstream parser so the error stays inside the trait surface
rather than leaking through as an upstream Io error.
OtsCrateError(String)
Any other failure surfaced inside the opentimestamps crate.
Wrapped with a stable String so a hostile upstream cannot
expand the variant set on us.
Trait Implementations§
Source§impl Error for OtsError
impl Error for OtsError
1.30.0 · 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()