#[non_exhaustive]pub enum SqlError {
Backend(Redacted),
Constraint,
Full,
Corrupt(&'static str),
}Expand description
Why a SQL call failed. The backend’s own message never reaches a client:
it is kept Redacted for the server-side log only.
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.
Backend(Redacted)
The engine failed (I/O, busy past its timeout, a malformed statement). The outcome of a failed transaction is a rollback.
Constraint
A constraint was violated.
Full
The database is at its size cap (SQLITE_FULL): writes that add data
fail, reads and deletes keep working.
Corrupt(&'static str)
A row did not have the expected shape.
Trait Implementations§
Source§impl Error for SqlError
impl Error for SqlError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns 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()
Auto Trait Implementations§
impl Freeze for SqlError
impl RefUnwindSafe for SqlError
impl Send for SqlError
impl Sync for SqlError
impl Unpin for SqlError
impl UnsafeUnpin for SqlError
impl UnwindSafe for SqlError
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