Skip to main content

Error

Enum Error 

Source
#[non_exhaustive]
pub enum Error {
Show 51 variants MetadataProjection(MetadataProjectionLoadError), MetadataView(MetadataViewError), VisiblePath(VisiblePathError), DurableContent(DurableContentValidationError), WriterEpoch(WriterEpochAcquireError), CommitValidation(CommitValidationError), WalBuild(WalBuildError), HeadPublish(CommitHeadPublishError), WalWrite { object_key: String, message: String, class: StoreFailureClass, }, InvalidPath(String), InvalidNamespaceId(NamespaceIdValidationError), InvalidCommitId(CommitIdValidationError), InvalidCommitRequest(String), InvalidUploadId(GeneratedIdValidationError), PathNotFound(String), RevisionNotFound { inode_id: InodeId, revision_no: RevisionNo, }, ContentTooLarge { size_bytes: u64, max_bytes: u64, }, BatchTooLarge { requested: usize, max: usize, }, ResumeOffsetOutOfRange { start_offset: u64, size_bytes: u64, }, ResumePrefixIncomplete { start_offset: u64, folded: u64, }, ExpectedFile { path: String, kind: InodeKind, }, ExpectedDirectory { path: String, kind: InodeKind, }, DirectoryNotEmpty(String), RootMutationForbidden, DestinationExists { path: String, existing_display_name: Option<String>, }, CommitIdReuseConflict { commit_id: String, committed_seq: Option<ChangeSeq>, committed_fingerprint: Option<String>, }, ContentPreparation(ContentPreparationError), CommitQueueFull, ShuttingDown, CheckpointUnavailable(String), InvalidCheckpointRequest(String), MetadataPublicationBudgetExceeded { elapsed_ms: u64, budget_ms: u64, }, InvalidGcConfig(String), InvalidQuery(String), QueryUnindexable(String), IndexLagging { behind_commits: u64, }, UploadNotFound { upload_id: UploadId, }, UploadAlreadyCompleted { upload_id: UploadId, }, UploadContentConflict { upload_id: UploadId, }, InvalidUploadContent(String), InvalidCursor(String), RebootstrapRequired { after_seq: ChangeSeq, retention_floor_seq: ChangeSeq, }, NonDirectoryPathComponent(String), NamespaceCorrupt(String), WriterFenced(WriterFence), Store { object_key: String, message: String, class: StoreFailureClass, }, Internal(String), NamespaceExists { namespace_id: NamespaceId, }, NamespaceDeleted { namespace_id: NamespaceId, }, StaleHeadPrecondition { expected: ChangeSeq, actual: ChangeSeq, }, FailedOperation { operation_index: u32, source: Box<CoreError>, },
}
Expand description

Public error type returned by loonfs-core.

Use Error::kind for broad caller action and Error::code for a stable machine-readable reason. Detailed core error.

Most callers should branch on CoreError::kind or CoreError::code instead of matching every internal variant.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

MetadataProjection(MetadataProjectionLoadError)

§

MetadataView(MetadataViewError)

§

VisiblePath(VisiblePathError)

§

DurableContent(DurableContentValidationError)

§

WriterEpoch(WriterEpochAcquireError)

§

CommitValidation(CommitValidationError)

§

WalBuild(WalBuildError)

§

HeadPublish(CommitHeadPublishError)

§

WalWrite

Fields

§object_key: String
§message: String
§

InvalidPath(String)

§

InvalidNamespaceId(NamespaceIdValidationError)

§

InvalidCommitId(CommitIdValidationError)

§

InvalidCommitRequest(String)

§

InvalidUploadId(GeneratedIdValidationError)

§

PathNotFound(String)

§

RevisionNotFound

Fields

§inode_id: InodeId
§revision_no: RevisionNo
§

ContentTooLarge

A buffered content read was refused before any fetch: the resolved content is larger than the caller’s read budget allows in memory.

Fields

§size_bytes: u64
§max_bytes: u64
§

BatchTooLarge

A batch read asked for more items than one call answers. The caller splits the batch; nothing was read.

Fields

§requested: usize
§max: usize
§

ResumeOffsetOutOfRange

A streamed read was asked to start past the end of the content it reads. Nothing was read.

Fields

§start_offset: u64
§size_bytes: u64
§

ResumePrefixIncomplete

A streamed read that starts past zero was driven before the bytes it skipped were folded into its verification. Verification covers the whole object, so it cannot begin until the caller has handed over what it already holds. Nothing was read.

Fields

§start_offset: u64
§folded: u64
§

ExpectedFile

Fields

§path: String
§

ExpectedDirectory

Fields

§path: String
§

DirectoryNotEmpty(String)

§

RootMutationForbidden

§

DestinationExists

Fields

§path: String
§existing_display_name: Option<String>

Stored spelling of the occupying entry, when the planner had it. Rendered when it differs from what the caller typed, because sibling names collide after NFC normalization and case folding and the two spellings can look identical.

§

CommitIdReuseConflict

Fields

§commit_id: String
§committed_seq: Option<ChangeSeq>

Sequence the commit id already landed at, when the conflict was decided against a durable receipt — the receipt is what holds it. Absent when nothing has committed under the id yet and two live requests are claiming it at once, which is the one case a caller cannot reconcile by reading the feed.

§committed_fingerprint: Option<String>

Semantic identity of the mutation that landed under the id, taken from the same receipt as committed_seq and present exactly when it is. Reporting it is what lets a retry prove it is the same request by recomputing one value, rather than comparing whichever fields it thought to compare.

§

ContentPreparation(ContentPreparationError)

§

CommitQueueFull

§

ShuttingDown

The serving front-end closed admission for shutdown. New work is refused; work admitted earlier still settles.

§

CheckpointUnavailable(String)

§

InvalidCheckpointRequest(String)

§

MetadataPublicationBudgetExceeded

Fields

§elapsed_ms: u64
§budget_ms: u64
§

InvalidGcConfig(String)

§

InvalidQuery(String)

§

QueryUnindexable(String)

§

IndexLagging

Fields

§behind_commits: u64
§

UploadNotFound

Fields

§upload_id: UploadId
§

UploadAlreadyCompleted

Fields

§upload_id: UploadId
§

UploadContentConflict

Fields

§upload_id: UploadId
§

InvalidUploadContent(String)

§

InvalidCursor(String)

§

RebootstrapRequired

Fields

§after_seq: ChangeSeq
§retention_floor_seq: ChangeSeq
§

NonDirectoryPathComponent(String)

§

NamespaceCorrupt(String)

§

WriterFenced(WriterFence)

This writer session’s epoch was superseded. Terminal for the session: callers surface it without reacquiring.

§

Store

Fields

§object_key: String
§message: String
§

Internal(String)

Non-store internal failure (codec, overflow, invariant breach). Same wire code as ErrorCode::ServerError; the message is the detail.

§

NamespaceExists

Fields

§namespace_id: NamespaceId
§

NamespaceDeleted

Fields

§namespace_id: NamespaceId
§

StaleHeadPrecondition

A caller-supplied expected_head_seq did not match the head.

Distinct from the publish path’s CommitHeadPublishError::StaleHead, which reports a race the caller never asked about: this is a precondition the caller wrote, so the rejection owes it both numbers — what it asked for and what the namespace was actually at — and a caller that meant to delete the current head can retry against the sequence it found. Both carry the stale_head code.

Fields

§expected: ChangeSeq
§actual: ChangeSeq
§

FailedOperation

A batch stopped at one of its operations. A mutation commits all of its operations or none of them, so this names the operation that stopped the request and carries the failure it produced. The wire code stays the inner failure’s; the position joins the message and the structured details.

Only a request with more than one operation is wrapped: a single-operation request has one place to fail, so its error stays exactly what the operation produced.

Fields

§operation_index: u32
§source: Box<CoreError>

Implementations§

Source§

impl CoreError

Source

pub fn kind(&self) -> ErrorKind

Source

pub fn code(&self) -> ErrorCode

Source

pub fn message(&self) -> String

Source

pub fn details(&self) -> Option<ErrorDetails>

Structured wire details for this error, when the variant carries machine-usable identity (API spec, “Standard error contract”). The server serializes this beside CoreError::code; embedded callers can match the typed variants directly instead.

Trait Implementations§

Source§

impl Clone for CoreError

Source§

fn clone(&self) -> CoreError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for CoreError

Source§

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

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

impl Display for CoreError

Source§

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

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

impl Error for CoreError

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<CommitHeadPublishError> for CoreError

Source§

fn from(source: CommitHeadPublishError) -> Self

Converts to this type from the input type.
Source§

impl From<CommitIdValidationError> for CoreError

Source§

fn from(source: CommitIdValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<CommitValidationError> for CoreError

Source§

fn from(source: CommitValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<ContentPreparationError> for CoreError

Source§

fn from(source: ContentPreparationError) -> Self

Converts to this type from the input type.
Source§

impl From<CoreError> for BootstrapNamespaceError

Source§

fn from(source: CoreError) -> Self

Converts to this type from the input type.
Source§

impl From<DurableContentValidationError> for CoreError

Source§

fn from(source: DurableContentValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<GeneratedIdValidationError> for CoreError

Source§

fn from(source: GeneratedIdValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<ImmutableWriteError> for CoreError

Source§

fn from(value: ImmutableWriteError) -> Self

Converts to this type from the input type.
Source§

impl From<MetadataProjectionLoadError> for CoreError

Source§

fn from(source: MetadataProjectionLoadError) -> Self

Converts to this type from the input type.
Source§

impl From<MetadataViewError> for CoreError

Source§

fn from(source: MetadataViewError) -> Self

Converts to this type from the input type.
Source§

impl From<NamespaceCatalogLoadError> for CoreError

Source§

fn from(value: NamespaceCatalogLoadError) -> Self

Converts to this type from the input type.
Source§

impl From<NamespaceIdValidationError> for CoreError

Source§

fn from(source: NamespaceIdValidationError) -> Self

Converts to this type from the input type.
Source§

impl From<VisiblePathError> for CoreError

Source§

fn from(source: VisiblePathError) -> 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
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

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

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

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

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

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

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

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

fn with_current_subscriber(self) -> WithDispatch<Self>

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