Enum rusqlite::Error [] [src]

pub enum Error {
    SqliteFailure(Error, Option<String>),
    SqliteSingleThreadedMode,
    FromSqlConversionFailure(Box<Error + Send + Sync>),
    Utf8Error(Utf8Error),
    NulError(NulError),
    InvalidParameterName(String),
    InvalidPath(PathBuf),
    ExecuteReturnedResults,
    QueryReturnedNoRows,
    InvalidColumnIndex(c_int),
    InvalidColumnName(String),
    InvalidColumnType,
    StatementChangedRows(c_int),
    StatementFailedToInsertRow,
}

Enum listing possible errors from rusqlite.

Variants

SqliteFailure(Error, Option<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(Box<Error + Send + Sync>)

An error case available for implementors of the FromSql trait.

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(c_int)

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

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(c_int)

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

StatementFailedToInsertRow

Error when a query that was expected to insert a row did not change the connection's last_insert_rowid().

Trait Implementations

impl Debug for Error
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl From<Utf8Error> for Error
[src]

fn from(err: Utf8Error) -> Error

Performs the conversion.

impl From<NulError> for Error
[src]

fn from(err: NulError) -> Error

Performs the conversion.

impl Display for Error
[src]

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

Formats the value using the given formatter.

impl Error for Error
[src]

fn description(&self) -> &str

A short description of the error. Read more

fn cause(&self) -> Option<&Error>

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