pub enum DatabaseError {
FileNotFound,
IOError(Error),
InvalidGlobSet(Error),
FileTooLarge(PathBuf, usize, usize),
ChangeLogInUse,
PoisonedLogMutex,
WatcherInit(Error),
WatcherWatch(Error),
WatcherNotActive,
}Expand description
The primary error type for all database loading and mutation operations.
This enum consolidates errors from various sources, including file I/O, pattern matching, and concurrent access issues, into a single, unified type.
Variants§
FileNotFound
An attempt was made to access a file that does not exist in the database.
IOError(Error)
An error occurred during a filesystem read or write operation.
InvalidGlobSet(Error)
The set of user-provided glob patterns could not be compiled into a GlobSet.
FileTooLarge(PathBuf, usize, usize)
The file being loaded into the database is too large to be processed.
ChangeLogInUse
An attempt was made to commit or consume a ChangeLog while other
references to it still exist, indicating that other threads may not have
finished their work.
PoisonedLogMutex
The lock on a ChangeLog was “poisoned.”
This happens when a thread panics while holding the lock, leaving the data in an unrecoverable and potentially inconsistent state.
WatcherInit(Error)
Failed to initialize the file system watcher.
WatcherWatch(Error)
Failed to add a path to the file system watcher.
WatcherNotActive
Attempted to wait on a watcher that is not currently watching.
Trait Implementations§
Source§impl Debug for DatabaseError
impl Debug for DatabaseError
Source§impl Display for DatabaseError
impl Display for DatabaseError
Source§impl Error for DatabaseError
impl Error for DatabaseError
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 DatabaseError
impl From<Error> for DatabaseError
Source§impl From<Error> for DatabaseError
impl From<Error> for DatabaseError
Source§fn from(error: GlobSetError) -> Self
fn from(error: GlobSetError) -> Self
Auto Trait Implementations§
impl Freeze for DatabaseError
impl !RefUnwindSafe for DatabaseError
impl Send for DatabaseError
impl Sync for DatabaseError
impl Unpin for DatabaseError
impl !UnwindSafe for DatabaseError
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