pub struct HashMismatch;Expand description
The upstream delivered bytes that failed bao verification against the
requested content root — a paid-but-corrupt delivery (the content-addressing
invariant, ADR 014/038). Under ADR 038 the verifier is the per-chunk-group
bao-tree decoder fed as bytes arrive, not a whole-blob re-hash, so this
fires the moment any group’s proof mismatches. Returned (via anyhow) by
this crate’s decoding consumers — [ClientRangedStore::ingest_stream] and the
test-util in-memory decoder — so callers can downcast_ref to classify corruption
(e.g. a reputation Corruption outcome) without matching on the error
message string. The Display text is kept stable for logs and the existing
requester tests. The node’s cache admit reports the same fault as
CacheError::VerifyFailed / CacheError::HashMismatch, which decdn-node’s
is_bao_corruption folds together with this type.
Trait Implementations§
Source§impl Debug for HashMismatch
impl Debug for HashMismatch
Source§impl Display for HashMismatch
impl Display for HashMismatch
Source§impl Error for HashMismatch
impl Error for HashMismatch
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()
Auto Trait Implementations§
impl Freeze for HashMismatch
impl RefUnwindSafe for HashMismatch
impl Send for HashMismatch
impl Sync for HashMismatch
impl Unpin for HashMismatch
impl UnsafeUnpin for HashMismatch
impl UnwindSafe for HashMismatch
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreimpl<T> MaybeSend for Twhere
T: Send,
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.