pub enum StoreError {
DoesNotExist,
Io {
source: Error,
},
Load {
source: Error,
},
Str {
source: Utf8Error,
},
ProcessEndedWithoutSuccess,
UnsupportedVersion,
AmbiguousFlags(FlagSet<CheckFlag>),
MissingFlag(FlagSet<CheckFlag>),
BadStoreVersion(u8),
IsReadonly,
}
Expand description
Errors that can occur during store operations.
These errors handle various failure modes when interacting with the store:
- File system operations
- Data serialization/deserialization
- Version compatibility
Variants§
DoesNotExist
The store file does not exist.
This typically occurs on first run or if the store file was deleted.
Io
An I/O error occurred during store operations.
This can happen during file reading, writing, or filesystem operations.
Load
Failed to load store data from file.
This typically indicates corruption or an incompatible / outdated store format.
Str
Failed to convert data to UTF-8.
This can occur when reading store metadata like file hashes.
ProcessEndedWithoutSuccess
A subprocess (like sha256sum) exited with non-zero status.
UnsupportedVersion
Attempted to load a store with an unsupported version number.
This occurs when the store file version is newer or older than what this version of netpulse supports.
AmbiguousFlags(FlagSet<CheckFlag>)
A Check has flags that are exclusive to each other.
This variant contains a FlagSet with only the conflicting CheckFlags set.
MissingFlag(FlagSet<CheckFlag>)
A Check that does not have the required flags to be valid.
This variant contains a FlagSet with only the flags CheckFlags set that would make it a valid state. Exactly one of these flags must be set.
BadStoreVersion(u8)
Occurs when trying to convert an arbitrary u8 to a Version that is not defined. Only known Versions are valid.
IsReadonly
A store can be loaded as readonly if it’s corrupted or there is a version mismatch
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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
Source§impl From<Error> for StoreError
impl From<Error> for StoreError
Source§impl From<StoreError> for AnalysisError
impl From<StoreError> for AnalysisError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Source§impl From<StoreError> for RunError
impl From<StoreError> for RunError
Source§fn from(source: StoreError) -> Self
fn from(source: StoreError) -> Self
Auto Trait Implementations§
impl Freeze for StoreError
impl !RefUnwindSafe for StoreError
impl Send for StoreError
impl Sync for StoreError
impl Unpin 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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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