#[non_exhaustive]pub enum ErrorReason {
Show 14 variants
Aborted(AbortError),
Authorization(AuthorizationError),
Busy(BusyError),
CantOpen(CantOpenError),
Constraint(ConstraintError),
Corrupt(CorruptError),
Error(GeneralError),
Io(IoError),
Locked(LockedError),
ReadOnly(ReadOnlyError),
Row(RowError),
Fetch(FetchError),
Parameter(ParameterError),
TextEncoding(TextEncodingError),
}Expand description
Extended SQLite result codes that provide more specific information about errors.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Aborted(AbortError)
Specific reasons for an ErrorCategory::Aborted.
Authorization(AuthorizationError)
Specific reason for an ErrorCategory::Authorization.
Busy(BusyError)
Specific reason for an ErrorCategory::Busy.
CantOpen(CantOpenError)
Specific reason for an ErrorCategory::CantOpen.
Constraint(ConstraintError)
Specific reason for an ErrorCategory::Constraint.
Corrupt(CorruptError)
Specific reason for an ErrorCategory::Corrupt.
Error(GeneralError)
Specific reason for an ErrorCategory::Unknown.
Io(IoError)
Specific reason for an ErrorCategory::Io.
Locked(LockedError)
Specific reason for an ErrorCategory::Locked.
ReadOnly(ReadOnlyError)
Specific reason for an ErrorCategory::ReadOnly.
Row(RowError)
Specific reason for an ErrorCategory::Row.
(This error code is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorReason::Row.)
Fetch(FetchError)
Specific reason for an ErrorCategory::Fetch.
(This error code is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorReason::Fetch.)
Parameter(ParameterError)
Specific reason for an ErrorCategory::Parameter.
(This error code is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorReason::Parameter.)
TextEncoding(TextEncodingError)
Specific reason for an ErrorCategory::TextEncoding.
(This error code is defined by Squire; not SQLite.
No SQLite result codes correspond to ErrorReason::Parameter.)
Implementations§
Source§impl ErrorReason
impl ErrorReason
Sourcepub const fn is_aborted(&self) -> bool
pub const fn is_aborted(&self) -> bool
Returns true if this value is of type Aborted. Returns false otherwise
Returns true if this value is of type Authorization. Returns false otherwise
Sourcepub const fn is_busy(&self) -> bool
pub const fn is_busy(&self) -> bool
Returns true if this value is of type Busy. Returns false otherwise
Sourcepub const fn is_cant_open(&self) -> bool
pub const fn is_cant_open(&self) -> bool
Returns true if this value is of type CantOpen. Returns false otherwise
Sourcepub const fn is_constraint(&self) -> bool
pub const fn is_constraint(&self) -> bool
Returns true if this value is of type Constraint. Returns false otherwise
Sourcepub const fn is_corrupt(&self) -> bool
pub const fn is_corrupt(&self) -> bool
Returns true if this value is of type Corrupt. Returns false otherwise
Sourcepub const fn is_error(&self) -> bool
pub const fn is_error(&self) -> bool
Returns true if this value is of type Error. Returns false otherwise
Sourcepub const fn is_io(&self) -> bool
pub const fn is_io(&self) -> bool
Returns true if this value is of type Io. Returns false otherwise
Sourcepub const fn is_locked(&self) -> bool
pub const fn is_locked(&self) -> bool
Returns true if this value is of type Locked. Returns false otherwise
Sourcepub const fn is_read_only(&self) -> bool
pub const fn is_read_only(&self) -> bool
Returns true if this value is of type ReadOnly. Returns false otherwise
Sourcepub const fn is_row(&self) -> bool
pub const fn is_row(&self) -> bool
Returns true if this value is of type Row. Returns false otherwise
Sourcepub const fn is_fetch(&self) -> bool
pub const fn is_fetch(&self) -> bool
Returns true if this value is of type Fetch. Returns false otherwise
Sourcepub const fn is_parameter(&self) -> bool
pub const fn is_parameter(&self) -> bool
Returns true if this value is of type Parameter. Returns false otherwise
Sourcepub const fn is_text_encoding(&self) -> bool
pub const fn is_text_encoding(&self) -> bool
Returns true if this value is of type TextEncoding. Returns false otherwise
Source§impl ErrorReason
impl ErrorReason
Sourcepub const fn category(self) -> ErrorCategory
pub const fn category(self) -> ErrorCategory
Returns the primary error category for this extended error code.
Sourcepub const fn from_raw_code(code: i32) -> Option<Self>
pub const fn from_raw_code(code: i32) -> Option<Self>
Find the ErrorReason for a SQLite result code.
Trait Implementations§
Source§impl Clone for ErrorReason
impl Clone for ErrorReason
Source§fn clone(&self) -> ErrorReason
fn clone(&self) -> ErrorReason
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more