Enum rusqlite::types::FromSqlError
source · #[non_exhaustive]pub enum FromSqlError {
InvalidType,
OutOfRange(i64),
InvalidBlobSize {
expected_size: usize,
blob_size: usize,
},
Other(Box<dyn Error + Send + Sync + 'static>),
}
Expand description
Enum listing possible errors from FromSql
trait.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidType
Error when an SQLite value is requested, but the type of the result cannot be converted to the requested Rust type.
OutOfRange(i64)
Error when the i64 value returned by SQLite cannot be stored into the requested type.
InvalidBlobSize
Error when the blob result returned by SQLite cannot be stored into the requested type due to a size mismatch.
Fields
Other(Box<dyn Error + Send + Sync + 'static>)
An error case available for implementors of the FromSql
trait.
Trait Implementations§
source§impl Debug for FromSqlError
impl Debug for FromSqlError
source§impl Display for FromSqlError
impl Display for FromSqlError
source§impl Error for FromSqlError
impl Error for FromSqlError
source§fn 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.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
source§impl From<FromSqlError> for Error
impl From<FromSqlError> for Error
The conversion isn’t precise, but it’s convenient to have it
to allow use of get_raw(…).as_…()?
in callbacks that take Error
.
source§fn from(err: FromSqlError) -> Error
fn from(err: FromSqlError) -> Error
Converts to this type from the input type.
source§impl PartialEq for FromSqlError
impl PartialEq for FromSqlError
source§fn eq(&self, other: &FromSqlError) -> bool
fn eq(&self, other: &FromSqlError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.Auto Trait Implementations§
impl Freeze for FromSqlError
impl !RefUnwindSafe for FromSqlError
impl Send for FromSqlError
impl Sync for FromSqlError
impl Unpin for FromSqlError
impl !UnwindSafe for FromSqlError
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more