Skip to main content

Error

Enum Error 

Source
pub enum Error {
Show 42 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, 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.

Fields

§path: PathBuf

Path whose operation failed.

§source: Error

Underlying operating-system error.

§

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

§path: PathBuf

Child whose parent chain is not known.

§reconcile_from: PathBuf

Nearest known directory from which a producer can reconcile safely.

§

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

The limits the index’s control table enforces.

§

JournalCapacityTooSmall

An opened root’s journal budget is below MIN_JOURNAL_CAPACITY_BYTES.

Fields

§requested: usize

The budget requested, in bytes.

§

ScanScopeMismatch

Requested scan semantics differ from the index’s immutable scope.

Fields

§indexed: ScanScope

Scope represented by the index.

§requested: ScanScope

Scope requested by the operation.

§

SubtreeOutsideScanScope

A requested relative subtree lies beyond the configured scan boundary.

Fields

§path: PathBuf

Rejected relative path.

§scope: ScanScope

Scope that excludes the path.

§

IndexLockPoisoned

A writer panicked while owning the shared index lock.

§

ClockExhausted

No further logical commit clock can be represented.

§

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

§attempted: usize

Paths supplied by the caller.

§limit: usize

Maximum paths accepted by one request.

§

RefreshPathLimit

A refresh request exceeded the public per-call input bound.

Fields

§attempted: usize

Paths supplied by the caller.

§limit: usize

Maximum paths accepted by one request.

§

ReadProjectionLimit

A coherent read requested more projections than one bounded call accepts.

Fields

§attempted: usize

Projections supplied by the caller.

§limit: usize

Maximum projections accepted by one request.

§

VersionUnavailable

A pinned coherent read named a foreign or no-longer-current version.

Fields

§requested: Box<EngineVersion>

Version required by the caller.

§current: Box<EngineVersion>

Only version the live image can currently answer.

§

PageRowLimit

A page output bound was zero or exceeded the public maximum.

Fields

§attempted: usize

Rejected row limit.

§limit: usize

Maximum accepted row limit.

§

PageWorkLimit

A page work bound was zero or exceeded the public maximum.

Fields

§attempted: u64

Rejected work limit.

§limit: u64

Maximum accepted work limit.

§

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.

Fields

§attempted: u64

Rejected count cap.

§limit: u64

Maximum accepted count cap.

§

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

§attempted: usize

Views and omitted-view records supplied by the caller.

§limit: usize

Maximum accepted combined records.

§

ContinuationUnavailable

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.

§

ChangeCursorUnavailable

A change cursor belongs to another handle, has incompatible identities, or is in the future.

Fields

§requested: Box<EngineVersion>

Cursor supplied by the consumer.

§current: Box<EngineVersion>

Current live version against which it was validated.

§

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.

Fields

§worker: &'static str

Stable role of the failed worker.

§

OpenedWorkerFailed

An owned opened-index worker returned a terminal error during joined shutdown.

Fields

§worker: &'static str

Stable role of the failed worker.

§source: Arc<Error>

Original typed engine error, shared so repeated close returns the same cause.

§

OpenedWorkerSpawn

An operating-system thread could not be created for an opened-index worker.

Fields

§worker: &'static str

Stable role of the worker that could not start.

§source: Error

Underlying operating-system error.

§

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

§kind: &'static str

Which grammar was expected, for the message: time or size.

§value: String

The rejected input, as written.

§hint: String

What to write instead.

§

WatchRootMismatch

A watcher was paired with an index rooted at a different directory.

Fields

§watched: PathBuf

Canonical root owned by the watcher.

§indexed: PathBuf

Canonical root owned by the index.

Trait Implementations§

Source§

impl Debug for Error

Source§

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

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

impl Display for Error

Source§

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

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

impl Error for Error

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§

§

impl !RefUnwindSafe for Error

§

impl !UnwindSafe for Error

§

impl Freeze for Error

§

impl Send for Error

§

impl Sync for Error

§

impl Unpin for Error

§

impl UnsafeUnpin for Error

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.