[][src]Enum rusqlite::Error

pub enum Error {
    SqliteFailure(ErrorOption<String>),
    SqliteSingleThreadedMode,
    FromSqlConversionFailure(usizeTypeBox<dyn Error + Send + Sync>),
    IntegralValueOutOfRange(usizei64),
    Utf8Error(Utf8Error),
    NulError(NulError),
    InvalidParameterName(String),
    InvalidPath(PathBuf),
    ExecuteReturnedResults,
    QueryReturnedNoRows,
    InvalidColumnIndex(usize),
    InvalidColumnName(String),
    InvalidColumnType(usizeType),
    StatementChangedRows(usize),
    InvalidFunctionParameterType(usizeType),
    InvalidFilterParameterType(usizeType),
    UserFunctionError(Box<dyn Error + Send + Sync>),
    ToSqlConversionFailure(Box<dyn Error + Send + Sync>),
    InvalidQuery,
    ModuleError(String),
    UnwindingPanic,
    GetAuxWrongType,
}

Enum listing possible errors from rusqlite.

Variants

SqliteFailure(ErrorOption<String>)

An error from an underlying SQLite call.

SqliteSingleThreadedMode

Error reported when attempting to open a connection when SQLite was configured to allow single-threaded use only.

FromSqlConversionFailure(usizeTypeBox<dyn Error + Send + Sync>)

Error when the value of a particular column is requested, but it cannot be converted to the requested Rust type.

IntegralValueOutOfRange(usizei64)

Error when SQLite gives us an integral value outside the range of the requested type (e.g., trying to get the value 1000 into a u8). The associated usize is the column index, and the associated i64 is the value returned by SQLite.

Utf8Error(Utf8Error)

Error converting a string to UTF-8.

NulError(NulError)

Error converting a string to a C-compatible string because it contained an embedded nul.

InvalidParameterName(String)

Error when using SQL named parameters and passing a parameter name not present in the SQL.

InvalidPath(PathBuf)

Error converting a file path to a string.

ExecuteReturnedResults

Error returned when an execute call returns rows.

QueryReturnedNoRows

Error when a query that was expected to return at least one row (e.g., for query_row) did not return any.

InvalidColumnIndex(usize)

Error when the value of a particular column is requested, but the index is out of range for the statement.

InvalidColumnName(String)

Error when the value of a named column is requested, but no column matches the name for the statement.

InvalidColumnType(usizeType)

Error when the value of a particular column is requested, but the type of the result in that column cannot be converted to the requested Rust type.

StatementChangedRows(usize)

Error when a query that was expected to insert one row did not insert any or insert many.

InvalidFunctionParameterType(usizeType)

Error returned by functions::Context::get when the function argument cannot be converted to the requested type.

InvalidFilterParameterType(usizeType)

Error returned by vtab::Values::get when the filter argument cannot be converted to the requested type.

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

An error case available for implementors of custom user functions (e.g., create_scalar_function).

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

Error available for the implementors of the ToSql trait.

InvalidQuery

Error when the SQL is not a SELECT, is not read-only.

ModuleError(String)

An error case available for implementors of custom modules (e.g., create_module).

UnwindingPanicGetAuxWrongType

An error returned when Context::get_aux attempts to retrieve data of a different type than what had been stored using Context::set_aux.

Trait Implementations

impl PartialEq<Error> for Error[src]

#[must_use]
fn ne(&self, other: &Rhs) -> bool
1.0.0
[src]

This method tests for !=.

impl From<Utf8Error> for Error[src]

impl From<NulError> for Error[src]

impl Display for Error[src]

impl Debug for Error[src]

impl Error for Error[src]

fn source(&self) -> Option<&(dyn Error + 'static)>
1.30.0
[src]

The lower-level source of this error, if any. Read more

fn type_id(&self) -> TypeId where
    Self: 'static, 
1.34.0
[src]

Gets the TypeId of self

Auto Trait Implementations

impl Send for Error

impl Sync for Error

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.