#[non_exhaustive]pub enum IndexError {
Io(Error),
IndexNotFound(PathBuf),
InvalidPattern(String),
CorruptIndex(String),
PathOutsideRepo(PathBuf),
FileTooLarge {
path: PathBuf,
size: u64,
},
LockConflict(PathBuf),
OverlayFull {
overlay_docs: usize,
base_docs: usize,
},
DocIdOverflow {
base_doc_count: u32,
overlay_docs: usize,
},
}Expand description
Errors returned by index 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.
Io(Error)
I/O error (file not found, permission denied, etc.)
IndexNotFound(PathBuf)
No index exists at the given index directory. Build one first
(Index::build, or st index from the CLI).
InvalidPattern(String)
Invalid regex pattern.
CorruptIndex(String)
Index is corrupt and needs rebuilding.
PathOutsideRepo(PathBuf)
Path is outside the repository root.
FileTooLarge
File exceeds maximum indexable size.
LockConflict(PathBuf)
Another process holds a conflicting lock on the index directory.
OverlayFull
Overlay has grown too large relative to the base index.
Call Index::build() to perform a full reindex.
Fields
DocIdOverflow
Document ID space exceeded u32::MAX.
Trait Implementations§
Source§impl Debug for IndexError
impl Debug for IndexError
Source§impl Display for IndexError
impl Display for IndexError
Source§impl Error for IndexError
impl Error for IndexError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for IndexError
impl !UnwindSafe for IndexError
impl Freeze for IndexError
impl Send for IndexError
impl Sync for IndexError
impl Unpin for IndexError
impl UnsafeUnpin for IndexError
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
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>
Converts
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>
Converts
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