#[non_exhaustive]pub enum StoreError {
Io(Error),
Deserialize(Error),
Serialize(Error),
LockTimeout {
path: Utf8PathBuf,
},
SchemaTooNew {
theirs: String,
ours: String,
},
MissingField {
field: &'static str,
},
PathTraversal {
path: Utf8PathBuf,
},
}Expand description
Errors emitted by Store implementations.
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.
Io(Error)
Underlying I/O failure.
Deserialize(Error)
Malformed TOML or schema mismatch on read.
Serialize(Error)
Failed to serialize a Metadata to TOML.
LockTimeout
Could not acquire the advisory flock within the 5 s budget named in
docs/STORE.md §4.
Fields
§
path: Utf8PathBufThe lock-file path that was contended.
SchemaTooNew
The on-disk schema_version is a future major; per docs/STORE.md §3
the entry is read-only for this build.
Fields
MissingField
A reserved field that the spec marks as required is missing.
PathTraversal
The supplied Safekey resolves to a path outside the store root.
Defense-in-depth check; Safekey construction already enforces the
[A-Za-z0-9._-]-only charset per docs/SAFEKEY.md.
Fields
§
path: Utf8PathBufThe offending resolved path.
Trait Implementations§
Source§impl Debug for StoreError
impl Debug for StoreError
Source§impl Display for StoreError
impl Display for StoreError
Source§impl Error for StoreError
impl Error for StoreError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<Error> for StoreError
impl From<Error> for StoreError
Source§impl From<Error> for StoreError
impl From<Error> for StoreError
Auto Trait Implementations§
impl Freeze for StoreError
impl !RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin for StoreError
impl UnsafeUnpin for StoreError
impl !UnwindSafe for StoreError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more