#[non_exhaustive]pub enum SnapshotError {
Show 14 variants
Concurrent(AgentId),
UnknownAgent(AgentId),
CrossTenant,
ChecksumMismatch,
SchemaTooNew {
bundle: u32,
runtime: u32,
},
MissingArtifact(String),
RestoreRefused(String),
Encryption(String),
Retention(String),
NotFound(SnapshotId),
Io(Error),
Git(Error),
SerdeJson(Error),
Sqlx(Error),
}Expand description
Failure modes surfaced by every public method on
crate::snapshotter::MemorySnapshotter. Each variant maps to a stable
CLI exit code + Prometheus outcome label so operators and tests can
branch on the failure class without parsing strings.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Concurrent(AgentId)
Another snapshot is already being captured for this agent. Holders release the lock on completion or after the configured timeout.
UnknownAgent(AgentId)
The agent id has no on-disk state under this tenant root.
CrossTenant
A bundle path resolved outside its tenant root. Always a programming error or a hostile bundle name; never a transient failure.
ChecksumMismatch
Either the manifest’s whole-bundle hash or one of the per-artifact hashes did not match the recomputed value.
SchemaTooNew
Bundle’s manifest_version is newer than this binary supports.
Operators must upgrade the runtime; older bundles are accepted
because the codec is forwards-compatible.
MissingArtifact(String)
A required artifact named in the manifest is missing from the bundle body.
RestoreRefused(String)
Restore preconditions failed (e.g. workers refused to pause,
pre-snapshot failed, target dir not empty without --force).
Encryption(String)
Encryption layer failed (key rejected, ciphertext malformed,
snapshot-encryption feature off when bundle is age-wrapped).
Retention(String)
Retention sweep refused to delete (e.g. keep_count would drop
below 1, or restore-in-progress on the candidate).
NotFound(SnapshotId)
A snapshot id exists in the manifest layout but the file under the tenant root is gone.
Io(Error)
Git(Error)
SerdeJson(Error)
Sqlx(Error)
Trait Implementations§
Source§impl Debug for SnapshotError
impl Debug for SnapshotError
Source§impl Display for SnapshotError
impl Display for SnapshotError
Source§impl Error for SnapshotError
impl Error for SnapshotError
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 From<Error> for SnapshotError
impl From<Error> for SnapshotError
Source§impl From<Error> for SnapshotError
impl From<Error> for SnapshotError
Source§impl From<Error> for SnapshotError
impl From<Error> for SnapshotError
Auto Trait Implementations§
impl Freeze for SnapshotError
impl !RefUnwindSafe for SnapshotError
impl Send for SnapshotError
impl Sync for SnapshotError
impl Unpin for SnapshotError
impl UnsafeUnpin for SnapshotError
impl !UnwindSafe for SnapshotError
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 more