#[non_exhaustive]pub enum Error {
Show 14 variants
Path(PathError),
NoRoute {
path: Path,
},
Codec {
kind: CodecErrorKind,
operation: CodecOperation,
format: Format,
message: String,
},
UnsupportedFormat(Format),
Ll(LLError),
Io(Error),
Store {
store: &'static str,
operation: &'static str,
message: String,
},
NotFound {
path: Path,
},
PermissionDenied {
message: String,
},
Conflict {
message: String,
},
Overloaded {
message: String,
},
DeadlineExceeded {
message: String,
},
ResourceLimit {
message: String,
},
Cancelled {
message: String,
},
}Expand description
Errors at the Core layer.
These include semantic errors (invalid paths, codec failures) in addition to the transport errors from the LL layer.
The typed variants (NotFound, PermissionDenied, Conflict,
Overloaded, DeadlineExceeded, ResourceLimit) exist so that stores
and transports can map errors structurally instead of string-matching
messages. Prefer them over Store when one fits.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Path(PathError)
Path validation error.
NoRoute
No route found for path (in overlay/mount stores).
Codec
Codec error during encode/decode.
UnsupportedFormat(Format)
Format not supported by codec.
Ll(LLError)
Error from the LL layer.
Io(Error)
I/O error (filesystem, network).
Store
Store-specific error with context.
NotFound
An operation referenced a path that does not exist.
Note: Reader::read signals a missing path with Ok(None); this
variant is for operations that require the path to exist (writes
to handles, deletes, remote calls).
PermissionDenied
The caller is not allowed to perform this operation.
Conflict
The operation conflicts with concurrent or existing state (stale version, handle already exists, etc.).
Overloaded
The store is temporarily unable to accept the operation.
DeadlineExceeded
The operation did not complete within its deadline.
ResourceLimit
A resource limit was exceeded (size, depth, count, quota).
Cancelled
The operation was cancelled — typically a parked read whose handle was released or whose store is shutting down.
Implementations§
Source§impl Error
impl Error
Sourcepub fn store(
store: &'static str,
operation: &'static str,
message: impl Into<String>,
) -> Self
pub fn store( store: &'static str, operation: &'static str, message: impl Into<String>, ) -> Self
Create a store-specific error.
Sourcepub fn permission_denied(message: impl Into<String>) -> Self
pub fn permission_denied(message: impl Into<String>) -> Self
Create a permission-denied error.
Sourcepub fn overloaded(message: impl Into<String>) -> Self
pub fn overloaded(message: impl Into<String>) -> Self
Create an overloaded error.
Sourcepub fn deadline_exceeded(message: impl Into<String>) -> Self
pub fn deadline_exceeded(message: impl Into<String>) -> Self
Create a deadline-exceeded error.
Sourcepub fn resource_limit(message: impl Into<String>) -> Self
pub fn resource_limit(message: impl Into<String>) -> Self
Create a resource-limit error.
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Whether this error is a cancellation.
Sourcepub fn is_not_found(&self) -> bool
pub fn is_not_found(&self) -> bool
Whether this error is a not-found error.
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()