#[non_exhaustive]#[repr(i32)]pub enum ErrorCategory {
Show 29 variants
Unknown = 1,
Internal = 2,
Permission = 3,
Aborted = 4,
Busy = 5,
Locked = 6,
OutOfMemory = 7,
ReadOnly = 8,
Interrupt = 9,
Io = 10,
Corrupt = 11,
NotFound = 12,
Full = 13,
CantOpen = 14,
Protocol = 15,
Empty = 16,
Schema = 17,
TooBig = 18,
Constraint = 19,
Mismatch = 20,
Misuse = 21,
LargeFile = 22,
Authorization = 23,
Format = 24,
Range = 25,
InvalidDatabase = 26,
Fetch = 193,
Parameter = 194,
Row = 195,
}Expand description
The category of Error that occurred.
Error categories correspond to a SQLite primary result code, except for
those defined by Squire itself (Fetch,
Parameter, and Row).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unknown = 1
A generic error code that SQLite returns when no specific error code is available.
Internal = 2
Indicates an internal error (bug) in SQLite, an application-defined function, virtual table, VFS, or extension.
Permission = 3
The requested access mode for a newly created database could not be provided.
Aborted = 4
An operation was aborted prior to completion, usually by application request.
Busy = 5
The database file could not be written (or in some cases read) because of concurrent activity by some other database connection.
Locked = 6
A write operation could not continue because of a conflict within the same database connection or a conflict with a different database connection that uses a shared cache.
OutOfMemory = 7
SQLite was unable to allocate all the memory it needed to complete the operation.
ReadOnly = 8
An attempt is made to alter some data for which the current database connection does not have write permission.
Interrupt = 9
An operation was interrupted by the sqlite3_interrupt() interface.
Io = 10
The operation could not finish because the operating system reported an I/O error.
Corrupt = 11
The database file has been corrupted.
NotFound = 12
Used internally by SQLite, not typically exposed to applications.
Full = 13
A write could not complete because the disk is full.
CantOpen = 14
SQLite was unable to open a file.
Protocol = 15
A problem with the file locking protocol used by SQLite.
Empty = 16
Not currently used by SQLite.
Schema = 17
The database schema has changed.
TooBig = 18
A string or BLOB was too large.
Constraint = 19
A SQL constraint violation occurred.
Mismatch = 20
A datatype mismatch occurred.
Misuse = 21
The application uses any SQLite interface in a way that is undefined or unsupported.
LargeFile = 22
The system does not support large files when the database grows to be larger than what the filesystem can handle.
Authorization = 23
The authorizer callback indicates that a SQL statement being prepared is not authorized.
Format = 24
Not currently used by SQLite.
Range = 25
The parameter number argument to one of the sqlite3_bind routines or the column number in one of the sqlite3_column routines is out of range.
InvalidDatabase = 26
When attempting to open a file, the file being opened does not appear to be a SQLite database file.
Fetch = 193
A column value stored in SQLite could not be read into a Rust type.
(This error category is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorCategory::Fetch.)
Parameter = 194
A parameter could not be bound; the error message gives more detail about the underlying error.
(This error category is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorCategory::Parameter.)
Row = 195
A column value stored in SQLite could not be read into a Rust type.
(This error category is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorCategory::Row.)
Implementations§
Source§impl ErrorCategory
impl ErrorCategory
Sourcepub const fn from_code(code: ErrorCode) -> Option<Self>
pub const fn from_code(code: ErrorCode) -> Option<Self>
Find the ErrorCategory for an ErrorCode.
Sourcepub const fn from_raw_code(code: i32) -> Option<Self>
pub const fn from_raw_code(code: i32) -> Option<Self>
Find the ErrorCategory for a SQLite result code.
Trait Implementations§
Source§impl Clone for ErrorCategory
impl Clone for ErrorCategory
Source§fn clone(&self) -> ErrorCategory
fn clone(&self) -> ErrorCategory
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more