Enum rusqlite::Error [−][src]
#[non_exhaustive] pub enum Error {}Show variants
SqliteFailure(Error, Option<String>), SqliteSingleThreadedMode, FromSqlConversionFailure(usize, Type, Box<dyn Error + Send + Sync + 'static>), IntegralValueOutOfRange(usize, i64), Utf8Error(Utf8Error), NulError(NulError), InvalidParameterName(String), InvalidPath(PathBuf), ExecuteReturnedResults, QueryReturnedNoRows, InvalidColumnIndex(usize), InvalidColumnName(String), InvalidColumnType(usize, String, Type), StatementChangedRows(usize), InvalidFunctionParameterType(usize, Type), InvalidFilterParameterType(usize, Type), UserFunctionError(Box<dyn Error + Send + Sync + 'static>), ToSqlConversionFailure(Box<dyn Error + Send + Sync + 'static>), InvalidQuery, ModuleError(String), UnwindingPanic, GetAuxWrongType, MultipleStatement, InvalidParameterCount(usize, usize), BlobSizeError,
Enum listing possible errors from rusqlite.
Variants (Non-exhaustive)
An error from an underlying SQLite call.
Error reported when attempting to open a connection when SQLite was configured to allow single-threaded use only.
Error when the value of a particular column is requested, but it cannot be converted to the requested Rust type.
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.
Error returned when an execute
call
returns rows.
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.
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.
Error returned by
functions::Context::get
when the
function argument cannot be converted to the requested type.
Error returned by vtab::Values::get
when
the filter argument cannot be converted to the requested type.
An error case available for implementors of custom user functions (e.g.,
create_scalar_function
).
Error available for the implementors of the
ToSql
trait.
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
).
An unwinding panic occurs in an UDF (user-defined function).
An error returned when
Context::get_aux
attempts to
retrieve data of a different type than what had been stored using
Context::set_aux
.
Error when the SQL contains multiple statements.
Error when the number of bound parameters does not match the number of
parameters in the query. The first usize
is how many parameters were
given, the 2nd is how many were expected.
Returned from various functions in the Blob IO positional API. For
example,
Blob::raw_read_at_exact
will
return it if the blob has insufficient data.
Trait Implementations
impl Error for Error
[src]
impl Error for Error
[src]fn source(&self) -> Option<&(dyn Error + 'static)>
[src]
fn source(&self) -> Option<&(dyn Error + 'static)>
[src]The lower-level source of this error, if any. Read more
fn backtrace(&self) -> Option<&Backtrace>
[src]
fn backtrace(&self) -> Option<&Backtrace>
[src]backtrace
)Returns a stack backtrace, if available, of where this error occurred. Read more
fn description(&self) -> &str
1.0.0[src]
fn description(&self) -> &str
1.0.0[src]use the Display impl or to_string()
impl From<FromSqlError> for Error
[src]
impl From<FromSqlError> for Error
[src]The conversion isn’t precise, but it’s convenient to have it
to allow use of get_raw(…).as_…()?
in callbacks that take Error
.
fn from(err: FromSqlError) -> Error
[src]
fn from(err: FromSqlError) -> Error
[src]Performs the conversion.
Auto Trait Implementations
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more