Enum tantivy::error::TantivyError
source · [−]pub enum TantivyError {
Show 16 variants
OpenDirectoryError(OpenDirectoryError),
OpenReadError(OpenReadError),
OpenWriteError(OpenWriteError),
IndexAlreadyExists,
LockFailure(LockError, Option<String>),
IoError(Arc<Error>),
DataCorruption(DataCorruption),
Poisoned,
FieldNotFound(String),
InvalidArgument(String),
ErrorInThread(String),
IndexBuilderMissingArgument(&'static str),
SchemaError(String),
SystemError(String),
IncompatibleIndex(Incompatibility),
InternalError(String),
}
Expand description
The library’s error enum
Variants
OpenDirectoryError(OpenDirectoryError)
Failed to open the directory.
OpenReadError(OpenReadError)
Failed to open a file for read.
OpenWriteError(OpenWriteError)
Failed to open a file for write.
IndexAlreadyExists
Index already exists in this directory.
LockFailure(LockError, Option<String>)
Failed to acquire file lock.
IoError(Arc<Error>)
IO Error.
DataCorruption(DataCorruption)
Data corruption.
Poisoned
A thread holding the locked panicked and poisoned the lock.
FieldNotFound(String)
The provided field name does not exist.
InvalidArgument(String)
Invalid argument was passed by the user.
ErrorInThread(String)
An Error occurred in one of the threads.
IndexBuilderMissingArgument(&'static str)
An Error occurred related to opening or creating a index.
SchemaError(String)
An Error occurred related to the schema.
SystemError(String)
System error. (e.g.: We failed spawning a new thread).
IncompatibleIndex(Incompatibility)
Index incompatible with current version of Tantivy.
InternalError(String)
An internal error occurred. This is are internal states that should not be reached. e.g. a datastructure is incorrectly inititalized.
Trait Implementations
sourceimpl Clone for TantivyError
impl Clone for TantivyError
sourcefn clone(&self) -> TantivyError
fn clone(&self) -> TantivyError
Returns a copy of the value. Read more
1.0.0const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TantivyError
impl Debug for TantivyError
sourceimpl Display for TantivyError
impl Display for TantivyError
sourceimpl Error for TantivyError
impl Error for TantivyError
sourcefn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
The lower-level source of this error, if any. Read more
1.0.0fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0fn cause(&self) -> Option<&dyn Error>
fn cause(&self) -> Option<&dyn Error>
👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
sourceimpl From<ComponentRange> for TantivyError
impl From<ComponentRange> for TantivyError
sourcefn from(err: ComponentRange) -> TantivyError
fn from(err: ComponentRange) -> TantivyError
Converts to this type from the input type.
sourceimpl From<DataCorruption> for TantivyError
impl From<DataCorruption> for TantivyError
sourcefn from(data_corruption: DataCorruption) -> TantivyError
fn from(data_corruption: DataCorruption) -> TantivyError
Converts to this type from the input type.
sourceimpl From<DocParsingError> for TantivyError
impl From<DocParsingError> for TantivyError
sourcefn from(error: DocParsingError) -> TantivyError
fn from(error: DocParsingError) -> TantivyError
Converts to this type from the input type.
sourceimpl From<Error> for TantivyError
impl From<Error> for TantivyError
sourcefn from(io_err: Error) -> TantivyError
fn from(io_err: Error) -> TantivyError
Converts to this type from the input type.
sourceimpl From<Error> for TantivyError
impl From<Error> for TantivyError
sourcefn from(error: Error) -> TantivyError
fn from(error: Error) -> TantivyError
Converts to this type from the input type.
sourceimpl From<FastFieldNotAvailableError> for TantivyError
impl From<FastFieldNotAvailableError> for TantivyError
sourcefn from(fastfield_error: FastFieldNotAvailableError) -> TantivyError
fn from(fastfield_error: FastFieldNotAvailableError) -> TantivyError
Converts to this type from the input type.
sourceimpl From<Format> for TantivyError
impl From<Format> for TantivyError
sourcefn from(err: Format) -> TantivyError
fn from(err: Format) -> TantivyError
Converts to this type from the input type.
sourceimpl From<LockError> for TantivyError
impl From<LockError> for TantivyError
sourcefn from(lock_error: LockError) -> TantivyError
fn from(lock_error: LockError) -> TantivyError
Converts to this type from the input type.
sourceimpl From<OpenDirectoryError> for TantivyError
impl From<OpenDirectoryError> for TantivyError
sourcefn from(source: OpenDirectoryError) -> Self
fn from(source: OpenDirectoryError) -> Self
Converts to this type from the input type.
sourceimpl From<OpenReadError> for TantivyError
impl From<OpenReadError> for TantivyError
sourcefn from(source: OpenReadError) -> Self
fn from(source: OpenReadError) -> Self
Converts to this type from the input type.
sourceimpl From<OpenWriteError> for TantivyError
impl From<OpenWriteError> for TantivyError
sourcefn from(source: OpenWriteError) -> Self
fn from(source: OpenWriteError) -> Self
Converts to this type from the input type.
sourceimpl From<Parse> for TantivyError
impl From<Parse> for TantivyError
sourcefn from(err: Parse) -> TantivyError
fn from(err: Parse) -> TantivyError
Converts to this type from the input type.
sourceimpl<Guard> From<PoisonError<Guard>> for TantivyError
impl<Guard> From<PoisonError<Guard>> for TantivyError
sourcefn from(_: PoisonError<Guard>) -> TantivyError
fn from(_: PoisonError<Guard>) -> TantivyError
Converts to this type from the input type.
sourceimpl From<QueryParserError> for TantivyError
impl From<QueryParserError> for TantivyError
sourcefn from(parsing_error: QueryParserError) -> TantivyError
fn from(parsing_error: QueryParserError) -> TantivyError
Converts to this type from the input type.
sourceimpl<T> From<TantivyError> for FutureResult<T>
impl<T> From<TantivyError> for FutureResult<T>
sourcefn from(err: TantivyError) -> Self
fn from(err: TantivyError) -> Self
Converts to this type from the input type.
sourceimpl From<ThreadPoolBuildError> for TantivyError
impl From<ThreadPoolBuildError> for TantivyError
sourcefn from(error: ThreadPoolBuildError) -> TantivyError
fn from(error: ThreadPoolBuildError) -> TantivyError
Converts to this type from the input type.
Auto Trait Implementations
impl !RefUnwindSafe for TantivyError
impl Send for TantivyError
impl Sync for TantivyError
impl Unpin for TantivyError
impl !UnwindSafe for TantivyError
Blanket Implementations
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstablefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
sourcefn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourcefn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read moresourcefn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read moresourceimpl<T> DowncastSync for Twhere
T: Any + Send + Sync,
impl<T> DowncastSync for Twhere
T: Any + Send + Sync,
sourcefn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>
fn into_any_arc(self: Arc<T>) -> Arc<dyn Any + Sync + Send + 'static>
Convert
Arc<Trait>
(where Trait: Downcast
) to Arc<Any>
. Arc<Any>
can then be
further downcast
into Arc<ConcreteType>
where ConcreteType
implements Trait
. Read moresourceimpl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
fn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
Uses borrowed data to replace owned data, usually by cloning. Read more