ErrorKind

Enum ErrorKind 

Source
pub enum ErrorKind {
    VersionMismatch {
        expected: u64,
        got: u64,
    },
    UnknownTitle(String),
    UnknownScorer(String),
    UnknownNgramType(String),
    UnknownSimilarity(String),
    UnknownDirective(String),
    Bug(String),
    Config(String),
    Csv(String),
    Fst(String),
    Io {
        err: Error,
        path: Option<PathBuf>,
    },
    Number(Box<dyn Error + Send + Sync>),
    // some variants omitted
}
Expand description

The specific kind of error that can occur.

Variants§

§

VersionMismatch

An index version mismatch. This error occurs when the version of the index is different from the version supported by this version of imdb-index.

Generally speaking, the versions must be exactly equivalent, otherwise this error is returned.

Fields

§expected: u64

The expected or supported index version.

§got: u64

The actual version of the index on disk.

§

UnknownTitle(String)

An error parsing the type of a title.

The data provided is the unrecognized title type.

§

UnknownScorer(String)

An error parsing the name of a scorer.

The data provided is the unrecognized name.

§

UnknownNgramType(String)

An error parsing the name of an ngram type.

The data provided is the unrecognized name.

§

UnknownSimilarity(String)

An error parsing the name of a similarity function.

The data provided is the unrecognized name.

§

UnknownDirective(String)

An error parsing the name of a directive from a free-form query.

The data provided is the unrecognized name.

§

Bug(String)

An unexpected error occurred while reading an index that should not have occurred. Generally, these errors correspond to bugs in this library.

§

Config(String)

An error occurred while reading/writing the index config.

§

Csv(String)

An error that occured while writing or reading CSV data.

§

Fst(String)

An error that occured while creating an FST index.

§

Io

An unexpected I/O error occurred.

Fields

§err: Error

The underlying I/O error.

§path: Option<PathBuf>

A file path, if the I/O error occurred in the context of a named file.

§

Number(Box<dyn Error + Send + Sync>)

An error occurred while parsing a number in a free-form query.

Trait Implementations§

Source§

impl Debug for ErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for ErrorKind

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.