#[non_exhaustive]pub enum ReplayContractError {
DuplicatePath,
DuplicateManifest,
}Expand description
A structural contract violation in the bundle, as opposed to a resource refusal.
Kept out of ReplayIngestError deliberately. The CLI maps every ingest refusal to
E_REPLAY_LIMIT_EXCEEDED, which says a configured budget was exceeded and nothing more:
adjusting the budget or supplying a smaller bundle is a legitimate response, and it is not a
malformed-input finding. It is also not a clean bill of health — the read stopped at the
ceiling, so whatever lies past it was never examined. A duplicate entry is a different kind of
answer: the archive is malformed and no budget will fix it. Folding these into one type would
tell an operator to raise a limit against an archive that must instead be rejected.
Value-free like the ingest refusals. The offending path is chosen by the archive, so echoing it hands an attacker a channel into the operator’s terminal and into every log that ingests the message, while telling the reader nothing they can act on.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
DuplicatePath
Two entries normalize to the same path. Last-wins is undefined, and silently keeping one lets an archive present different bytes to a verifier than to a consumer.
DuplicateManifest
A second manifest.json. Detected when the second is met — after the first has been read,
but before the second is read and before it can replace the first — so the manifest
that is verified is unambiguously the one the archive declared first.
Trait Implementations§
Source§impl Debug for ReplayContractError
impl Debug for ReplayContractError
Source§impl Display for ReplayContractError
impl Display for ReplayContractError
impl Eq for ReplayContractError
Source§impl Error for ReplayContractError
impl Error for ReplayContractError
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()
Source§impl PartialEq for ReplayContractError
impl PartialEq for ReplayContractError
impl StructuralPartialEq for ReplayContractError
Auto Trait Implementations§
impl Freeze for ReplayContractError
impl RefUnwindSafe for ReplayContractError
impl Send for ReplayContractError
impl Sync for ReplayContractError
impl Unpin for ReplayContractError
impl UnsafeUnpin for ReplayContractError
impl UnwindSafe for ReplayContractError
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
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.