Skip to main content

StorageError

Enum StorageError 

Source
pub enum StorageError {
Show 22 variants Io { op: &'static str, path: PathBuf, source: Error, }, VersionAhead { path: PathBuf, v: u64, }, Envelope { path: PathBuf, line: u64, source: AxError, }, Draft { source: AxError, }, CasMissing { hash: String, }, CasCorrupt { hash: String, path: PathBuf, }, RangeOutOfBounds { hash: String, }, SeqMissing { seq: u64, }, Checkpoint { op: &'static str, detail: String, }, SecretEgress { locations: String, }, Bundle { op: &'static str, detail: String, }, Worktree { op: &'static str, detail: String, }, WorktreeBusy { name: String, detail: String, }, MergeStale { name: String, detail: String, }, MergeWouldDiscard { paths: Vec<String>, }, Alias { op: &'static str, path: PathBuf, kind: AliasKind, }, NameTaken { path: PathBuf, }, LedgerHeld { dir: PathBuf, }, LedgerBroken { dir: PathBuf, at: Seq, }, ChainHalted { source: AxError, }, Unproven, Snapshot { op: &'static str, path: PathBuf, source: Error, },
}
Expand description

Crate root error; crosses the crate boundary only via StorageError::into_ax.

Variants§

§

Io

Fields

§op: &'static str
§path: PathBuf
§source: Error
§

VersionAhead

Fields

§path: PathBuf
§

Envelope

Fields

§path: PathBuf
§line: u64
§source: AxError
§

Draft

Fields

§source: AxError
§

CasMissing

Fields

§hash: String
§

CasCorrupt

Fields

§hash: String
§path: PathBuf
§

RangeOutOfBounds

Fields

§hash: String
§

SeqMissing

Fields

§seq: u64
§

Checkpoint

Fields

§op: &'static str
§detail: String
§

SecretEgress

Locations only. The matched bytes are never carried — proving a secret leaked by reprinting it would be the leak.

Fields

§locations: String
§

Bundle

An export or restore that is well-formed I/O but not a city: an occupied destination, a bundle whose manifest disagrees with what arrived, a chain with a gap.

Fields

§op: &'static str
§detail: String
§

Worktree

A tree that cannot be opened, added or pruned. Environment, not policy: the repository or the filesystem said no.

Fields

§op: &'static str
§detail: String
§

WorktreeBusy

A tree that cannot be granted now: the node already holds one, or granting it would cross the ceiling. Both are answered by giving a tree back, which is why they share a code.

Fields

§name: String
§detail: String
§

MergeStale

A node’s work that no longer sits on top of the trunk. Not a storage fault: the work is intact, and whether it still applies is the question a machine must not answer by itself.

Fields

§name: String
§detail: String
§

MergeWouldDiscard

A merge that would overwrite or delete a tracked file the person changed in the city folder and has not committed.

Fields

§paths: Vec<String>
§

Alias

A name that is an alias. The family is refused whole (crates/storage/spec/Alias.lean §8-25): a write through one lands where the name does not say.

Fields

§op: &'static str
§path: PathBuf
§

NameTaken

Something already stands at the name a create asked for: the file system answered at the moment of the write, so a second of two racing creates meets this (crates/storage/spec/Alias.lean §8-32).

Fields

§path: PathBuf
§

LedgerHeld

Another handle holds this city’s writer lock: a second process, or a second ledger in this one (crates/storage/spec/Jsonl.lean §8-1).

Fields

§

LedgerBroken

A wave’s write or barrier failed, so what the disk holds past at is unknown to this handle; only a reopen can judge it (crates/storage/spec/Jsonl.lean §8-1).

Fields

§at: Seq
§

ChainHalted

A whole-chain audit found a broken line, so this writer stopped taking new lines; source is the audit’s own reason (8-30).

Fields

§source: AxError
§

Unproven

This writer waits for the proof of the history it opened from, and writes nothing until the proof is whole (8-30).

§

Snapshot

The disk refused a snapshot read or write. A snapshot is a cache the Ledger rebuilds, so its advice differs from Io’s (8-26).

Fields

§op: &'static str
§path: PathBuf
§source: Error

Implementations§

Source§

impl StorageError

Source

pub fn into_ax(self) -> AxError

The only exit across the crate boundary.

Trait Implementations§

Source§

impl Debug for StorageError

Source§

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

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

impl Display for StorageError

Source§

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

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

impl Error for StorageError

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

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> 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 = !

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

fn try_from(value: U) -> Result<T, !>

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.