pub enum LifecycleError {
Show 29 variants
Io(String),
NotFound(String),
NotInTrash(Uuid),
Purged(Uuid),
RetentionElapsed {
asset_id: Uuid,
retention_until: String,
},
SelfVerify(VerifyOutcome),
MetadataUnbound(MetadataBinding),
RestoredMetadata(String),
Crypto(CryptoError),
Backup(BackupError),
Cbor(String),
Db(String),
Library(LibraryError),
AlbumStore(AlbumStoreError),
AlbumReadOnly(Uuid),
CiphertextMismatch(Uuid),
OriginalMismatch(Uuid),
CreateMetadataSuperseded(Uuid),
AlbumExists(Uuid),
AccountRebind(String),
Directory(DirectoryError),
UntrustedDirectory(String),
InvalidLabel(LabelError),
InvalidRegion(RegionError),
InvalidLocation {
lat: f64,
lon: f64,
},
Document(DocError),
UnverifiedDocument(Uuid),
StackAlbumMismatch {
stack_id: Uuid,
stack_album: Uuid,
asset_album: Uuid,
},
ResealRefused {
asset_id: Uuid,
reason: ResealRefusal,
},
}Expand description
Errors from lifecycle operations.
Variants§
Io(String)
Filesystem error.
NotFound(String)
Unknown album / asset id.
NotInTrash(Uuid)
A restore or purge named an asset that is not in the trash. Nothing was written.
Purged(Uuid)
A peer copy named an asset this workspace purged: its tombstone refuses every copy, so a purged asset is never resurrected. Nothing was written.
RetentionElapsed
A trash-restore at or after the signed retention_until of the asset’s delete
record. Nothing was written; the asset stays in the trash until it is purged.
Fields
asset_id: UuidThe asset the restore was asked for.
SelfVerify(VerifyOutcome)
An asset failed its own verify_asset self-check (a bug — should never happen).
MetadataUnbound(MetadataBinding)
A sealed metadata blob failed its own metadata↔manifest binding self-check (a bug — the sidecar the workspace just wrote does not round-trip to the committed hash).
RestoredMetadata(String)
A restored asset’s sealed metadata blob (a backup’s, or a peer delta’s) is not the one its chain commits to, or does not open, decode or verify under the account’s user IK. Nothing of the asset is written.
Crypto(CryptoError)
Cryptographic error.
Backup(BackupError)
Backup error.
Cbor(String)
CBOR (de)serialization error.
Db(String)
Library index (SQLite) error.
Library(LibraryError)
The on-disk library could not be opened. Typed rather than stringified so a caller
can act on the one open failure with its own recovery — a catalog stamped by a newer
build (LibraryError::CatalogTooNew) — instead of matching on text.
AlbumStore(AlbumStoreError)
The durable album-key store could not be read or written. Never swallowed: losing album keys silently is exactly the failure this store exists to fix.
AlbumReadOnly(Uuid)
The album holds AMKs but no write capability — it was recovered from a backup artifact, which escrows content keys (read access) but never the write-tier / admin signing keys or the admin-signed epoch ledger. Its assets decrypt and re-export; authoring a new write into it needs its authority re-established first.
CiphertextMismatch(Uuid)
The ciphertext re-derived from a manifest’s recorded nonce_prefix does not
content-address to that manifest’s ciphertext_hash — the library’s bytes and its own
signed manifest disagree. Never papered over: it is the one signal that what would go
on the wire is not what the asset’s provenance vouches for.
OriginalMismatch(Uuid)
The plaintext original handed to adopt_remote_original
does not hash to the digest the entry’s signed sidecar commits to: it is not the original
the chokepoint vouched for. Nothing of the asset was written.
CreateMetadataSuperseded(Uuid)
upload_bundle was asked for an asset whose create binds a
metadata blob the library no longer holds: an edit replaced it before the library kept
the create’s blob beside the chain, so neither copy answers the create’s
metadata_blob_hash. An upload carries the create, so it cannot be built; nothing was
sent.
AlbumExists(Uuid)
create_album_with_id was called for an album that
already holds key material. Minting over it would discard the AMKs every existing asset in
that album was encrypted under, so it is refused; use
ensure_album for resolve-or-create.
AccountRebind(String)
bind_account_id was refused: the library already holds
assets whose signed manifests name its current account id, so adopting another would
contradict its own history.
Directory(DirectoryError)
cross_sign_device was refused: the device or its
signing key is already in the directory, the entry arrived revoked, or the directory
version cannot advance. The directory is left unchanged.
UntrustedDirectory(String)
extend_account_directory was handed a directory
this workspace must not build on: its signature does not verify under this account’s
user IK, or it names another account. Nothing is adopted.
InvalidLabel(LabelError)
A label (or album name) was refused by the label rule: NFC, trimmed, 1–256 bytes.
InvalidRegion(RegionError)
A region shape broke the normalized-coordinate contract.
InvalidLocation
A location edit named a coordinate outside latitude [-90, 90] / longitude
[-180, 180], or one that is not finite. Nothing is appended.
Document(DocError)
A stack or album label document could not be decoded, sealed or opened.
UnverifiedDocument(Uuid)
A stack or album label document does not verify under this account’s user IK. Nothing is merged.
StackAlbumMismatch
Joining the asset to the stack would split the stack across container albums: every member of a stack belongs to the same album.
Fields
stack_id: UuidThe stack being joined.
stack_album: UuidThe album the stack’s members (or its label document) live in.
asset_album: UuidThe album of the asset that tried to join.
ResealRefused
reseal_create was refused: the asset is not a create this
device can safely re-seal at the album’s current epoch. Nothing was written.
Trait Implementations§
Source§impl Debug for LifecycleError
impl Debug for LifecycleError
Source§impl Display for LifecycleError
impl Display for LifecycleError
Source§impl Error for LifecycleError
impl Error for LifecycleError
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<AlbumStoreError> for LifecycleError
impl From<AlbumStoreError> for LifecycleError
Source§impl From<BackupError> for LifecycleError
impl From<BackupError> for LifecycleError
Source§impl From<CryptoError> for LifecycleError
impl From<CryptoError> for LifecycleError
Source§impl From<DirectoryError> for LifecycleError
impl From<DirectoryError> for LifecycleError
Source§impl From<DocError> for LifecycleError
impl From<DocError> for LifecycleError
Source§impl From<LabelError> for LifecycleError
impl From<LabelError> for LifecycleError
Source§impl From<LibraryError> for LifecycleError
impl From<LibraryError> for LifecycleError
Source§fn from(source: LibraryError) -> Self
fn from(source: LibraryError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for LifecycleError
impl !UnwindSafe for LifecycleError
impl Freeze for LifecycleError
impl Send for LifecycleError
impl Sync for LifecycleError
impl Unpin for LifecycleError
impl UnsafeUnpin for LifecycleError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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