pub enum Error {
Show 43 variants
Io {
path: PathBuf,
source: Error,
},
PathEscapesRoot(PathBuf),
UnknownAncestry {
path: PathBuf,
reconcile_from: PathBuf,
},
InvalidControlPath(PathBuf),
Snapshot(String),
UnsupportedScanConfig(&'static str),
ControlStateNotObserved,
ControlLimitsOutsideScope {
limits: ControlLimits,
},
JournalCapacityTooSmall {
requested: usize,
minimum: usize,
},
ScanScopeMismatch {
indexed: ScanScope,
requested: ScanScope,
},
SubtreeOutsideScanScope {
path: PathBuf,
scope: ScanScope,
},
IndexLockPoisoned,
ClockExhausted,
UnrepresentableTotal {
path: PathBuf,
counter: &'static str,
},
OpenedIdentityExhausted,
OpenedIndexClosed,
OpenedIndexStopped,
PriorityPathLimit {
attempted: usize,
limit: usize,
},
RefreshPathLimit {
attempted: usize,
limit: usize,
},
ReadProjectionLimit {
attempted: usize,
limit: usize,
},
VersionUnavailable {
requested: Box<EngineVersion>,
current: Box<EngineVersion>,
},
PageRowLimit {
attempted: usize,
limit: usize,
},
PageWorkLimit {
attempted: u64,
limit: u64,
},
TreeDepthZero,
UnsupportedFlatSelection,
CountCapLimit {
attempted: u64,
limit: u64,
},
InvalidRequest(RequestError),
ReportViewLimit {
attempted: usize,
limit: usize,
},
ContinuationUnavailable,
ContinuationIdentityExhausted,
ContinuationStale {
requested: Box<EngineVersion>,
current: Box<EngineVersion>,
},
ChangeCursorUnavailable {
requested: Box<EngineVersion>,
current: Box<EngineVersion>,
},
OpenedJournalPoisoned,
InvalidDirectoryCompletion(PathBuf),
OpenedLifecyclePoisoned,
OpenedWorkerPanicked {
worker: &'static str,
},
OpenedWorkerFailed {
worker: &'static str,
source: Arc<Error>,
},
OpenedWorkerSpawn {
worker: &'static str,
source: Error,
},
WatchStopped,
WatchWorkerPanicked,
ObservationHandoffIncomplete,
InvalidValue {
kind: &'static str,
value: String,
hint: String,
},
WatchRootMismatch {
watched: PathBuf,
indexed: PathBuf,
},
}Expand description
Errors the engine can report.
Variants§
Io
A filesystem operation failed at a specific path.
PathEscapesRoot(PathBuf)
An observation or subtree path was not relative to the index root.
UnknownAncestry
A live upsert named a child below ancestry the index has not verified.
Fields
InvalidControlPath(PathBuf)
A control observation did not name the fixed control filename.
Snapshot(String)
Snapshot persistence failed after a usable snapshot had been selected.
UnsupportedScanConfig(&'static str)
A scan or watch setting has no supported safe semantics.
Raised only where no request was built: a bound root, a raw scan, a watch
configuration, a scanner batch. A scope axis a request names is refused by
Request::validate as
RequestError::ScopeUnsupported
before any stored state is read, so a surface renders it in its own words and
classifies it as the refused request it is. Both print the same sentence, because
both ask ScopeAxis::reason for it.
ControlStateNotObserved
An index or report built without observing .gitignore control state was asked
about it, was asked to select entries by it, or was handed control input.
Such a scan read no control file and classified no entry, so answering “not
ignored” for every entry, handing back an empty control table, or selecting every
entry or none by ignored state would state a fact nobody observed. Nor does an index
accept a ControlUpsert or ControlRemove (Op): its scope says no rule was
read, and a table installed anyway would contradict it, in the index and in every
snapshot saved from it. Scanning with ScanConfig::read_controls
on, as it is by default, makes the answers exact.
ControlLimitsOutsideScope
An index’s control table enforces other limits than the ones its scan scope was taken under.
The scope’s ignore-rules identity names the limits that decide which .gitignore
rules apply, so a table refusing under other limits would contradict it, in the index
and in every snapshot saved from it. Index::new_with_scope applies
the default limits whatever its scope claims;
Index::new_with_config builds a table and a scope
from one configuration, so they agree.
Fields
limits: ControlLimitsThe limits the index’s control table enforces.
JournalCapacityTooSmall
An opened root’s journal budget is below MIN_JOURNAL_CAPACITY_BYTES.
ScanScopeMismatch
Requested scan semantics differ from the index’s immutable scope.
Fields
SubtreeOutsideScanScope
A requested relative subtree lies beyond the configured scan boundary.
IndexLockPoisoned
A writer panicked while owning the shared index lock.
ClockExhausted
No further logical commit clock can be represented.
UnrepresentableTotal
A tree, or a batch, would leave a whole-tree total no u64 can hold.
Roll-ups are u64 counts and byte totals, and every route that counts a tree
refuses one whose total leaves that range, with this error, rather than wrapping
or panicking. A filesystem can produce one: tmpfs, XFS, and btrfs let a sparse file
claim up to 8 EiB apparent without allocating anything, so three such files sum
past u64::MAX.
- A one-shot report, whether it folds a summary or builds a full or folded index, fails at the first file the root’s total cannot hold, and reports nothing.
- A batch committed to an index (
Index::apply, and every scan, refresh, reconciliation, and watch commit) is applied in order, so the index must be representable after each of its operations: a batch that removes before it adds is accepted where the reverse order is not. The batch is refused before any of it is applied, and the index, its clock, and its journal are as they were.
Fields
OpenedIdentityExhausted
No further live-session identity can be represented in this process.
OpenedIndexClosed
An operation was attempted after shared shutdown began.
OpenedIndexStopped
An expanding operation was attempted after a resource stop.
PriorityPathLimit
A priority request exceeded the public per-call bound.
Fields
RefreshPathLimit
A refresh request exceeded the public per-call input bound.
Fields
ReadProjectionLimit
A coherent read requested more projections than one bounded call accepts.
Fields
A pinned coherent read named a foreign or no-longer-current version.
PageRowLimit
A page output bound was zero or exceeded the public maximum.
PageWorkLimit
A page work bound was zero or exceeded the public maximum.
TreeDepthZero
A tree page asked for zero levels.
Distinct from the page bounds above, which are about how much of a level fits. Zero levels is not a small page, it is a request with no rows to return, and reporting it as a row-limit failure sends a caller to inspect the wrong argument.
UnsupportedFlatSelection
A flat page attempted to use presentation axes whose ordering is not resumable.
CountCapLimit
An aggregate cap was zero or exceeded the public maximum.
InvalidRequest(RequestError)
A request no holder of its own basis could answer, or that this holder cannot.
The refusal is a value, rendered here in the library’s field names; a surface that
built the request renders the same value in its own words through
RequestError::message, which is why every
door refuses one request with one rule.
ReportViewLimit
A report request exceeded the bounded section vocabulary for one read.
Fields
A continuation belongs to another opened root, or names an ordinal this root never issued.
Either is a malformed request, so the whole read fails. A token this root issued and
no longer retains – consumed or evicted – refuses only its own projection with
ProjectionRefusal::ContinuationUnavailable.
ContinuationIdentityExhausted
No further handle-local continuation identifier can be represented.
ContinuationStale
A continuation was pinned to an older committed image.
Fields
requested: Box<EngineVersion>Version captured by the continuation.
current: Box<EngineVersion>Current live version.
A change cursor belongs to another handle, has incompatible identities, or is in the future.
OpenedJournalPoisoned
A panic poisoned opened-root journal wait coordination.
InvalidDirectoryCompletion(PathBuf)
A producer tried to complete a path that was not a retained directory.
OpenedLifecyclePoisoned
A panic poisoned the opened index’s lifecycle coordination state.
OpenedWorkerPanicked
An owned opened-index worker panicked.
Joined shutdown reports it, and so does a change poll that would otherwise wait for commits the root can no longer make.
OpenedWorkerFailed
An owned opened-index worker returned a terminal error during joined shutdown.
Fields
OpenedWorkerSpawn
An operating-system thread could not be created for an opened-index worker.
Fields
WatchStopped
The watch worker ended permanently without panicking.
WatchWorkerPanicked
The watch worker panicked; its bounded channel is no longer live.
ObservationHandoffIncomplete
Capture began, but verification could not establish a complete live baseline.
InvalidValue
An argument value did not match its documented grammar.
Carries a suggestion rather than only a rejection, because these values are typed by humans and agents at a prompt: the whole point of a closed grammar is that a near miss can say what the near-hit spelling would be.
Fields
WatchRootMismatch
A watcher was paired with an index rooted at a different directory.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
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()