Skip to main content

LifecycleError

Enum LifecycleError 

Source
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: Uuid

The asset the restore was asked for.

§retention_until: String

The signed retention floor the restore came too late for (RFC 3339).

§

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.

Fields

§lat: f64

The refused latitude.

§lon: f64

The refused longitude.

§

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: Uuid

The stack being joined.

§stack_album: Uuid

The album the stack’s members (or its label document) live in.

§asset_album: Uuid

The 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.

Fields

§asset_id: Uuid

The asset the re-seal was asked for.

§reason: ResealRefusal

Why it was refused.

Trait Implementations§

Source§

impl Debug for LifecycleError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for LifecycleError

Source§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Error for LifecycleError

Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<AlbumStoreError> for LifecycleError

Source§

fn from(source: AlbumStoreError) -> Self

Converts to this type from the input type.
Source§

impl From<BackupError> for LifecycleError

Source§

fn from(source: BackupError) -> Self

Converts to this type from the input type.
Source§

impl From<CryptoError> for LifecycleError

Source§

fn from(source: CryptoError) -> Self

Converts to this type from the input type.
Source§

impl From<DirectoryError> for LifecycleError

Source§

fn from(source: DirectoryError) -> Self

Converts to this type from the input type.
Source§

impl From<DocError> for LifecycleError

Source§

fn from(source: DocError) -> Self

Converts to this type from the input type.
Source§

impl From<LabelError> for LifecycleError

Source§

fn from(source: LabelError) -> Self

Converts to this type from the input type.
Source§

impl From<LibraryError> for LifecycleError

Source§

fn from(source: LibraryError) -> Self

Converts to this type from the input type.
Source§

impl From<RegionError> for LifecycleError

Source§

fn from(source: RegionError) -> Self

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more