#[non_exhaustive]pub enum StoreError {
IoError {
operation: IoOperationKind,
path: String,
context: Option<String>,
error: String,
},
HomeDirNotFound,
FilenameEncoding {
id: String,
reason: String,
},
FormatConvert(FormatConvertError),
}Expand description
Error types for path and store operations.
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.
IoError
File I/O error with detailed operation context.
Provides specific information about which I/O operation failed, along with optional context (e.g., “temporary file”, “after 3 retries”).
Fields
§
operation: IoOperationKindThe I/O operation that failed.
HomeDirNotFound
Failed to find home directory.
FilenameEncoding
Failed to encode or decode a filename for the given entity ID.
Raised when a filename encoding strategy (Direct/UrlEncode/Base64) cannot encode the ID on write, or cannot decode the stored filename on read.
§Arguments
id- The entity ID that could not be encoded/decoded.reason- A human-readable explanation of the failure.
Fields
FormatConvert(FormatConvertError)
Format conversion failed (e.g. JSON → TOML serialization error).
Wraps a FormatConvertError produced by local_store::format_convert.
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<FormatConvertError> for StoreError
impl From<FormatConvertError> for StoreError
Source§fn from(source: FormatConvertError) -> StoreError
fn from(source: FormatConvertError) -> StoreError
Converts to this type from the input type.
Source§impl From<StoreError> for MigrationError
impl From<StoreError> for MigrationError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Converts to this type from the input type.
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