Skip to main content

ErrorCode

Enum ErrorCode 

Source
#[repr(i32)]
pub enum ErrorCode {
Show 31 variants Ok = 0, Error = 1, Internal = 2, Perm = 3, Abort = 4, Busy = 5, Locked = 6, NoMem = 7, ReadOnly = 8, Interrupt = 9, IoErr = 10, Corrupt = 11, NotFound = 12, Full = 13, CantOpen = 14, Protocol = 15, Empty = 16, Schema = 17, TooBig = 18, Constraint = 19, Mismatch = 20, Misuse = 21, NoLfs = 22, Auth = 23, Format = 24, Range = 25, NotADb = 26, Notice = 27, Warning = 28, Row = 100, Done = 101,
}
Expand description

SQLite result/error codes for wire protocol compatibility.

These match the numeric values from C SQLite’s sqlite3.h.

Variants§

§

Ok = 0

Successful result.

§

Error = 1

Generic error.

§

Internal = 2

Internal logic error.

§

Perm = 3

Access permission denied.

§

Abort = 4

Callback requested abort.

§

Busy = 5

Database file is locked.

§

Locked = 6

Table is locked.

§

NoMem = 7

Out of memory.

§

ReadOnly = 8

Attempt to write a read-only database.

§

Interrupt = 9

Interrupted by sqlite3_interrupt().

§

IoErr = 10

Disk I/O error.

§

Corrupt = 11

Database disk image is malformed.

§

NotFound = 12

Not found (internal).

§

Full = 13

Database or disk is full.

§

CantOpen = 14

Unable to open database file.

§

Protocol = 15

Locking protocol error.

§

Empty = 16

(Not used).

§

Schema = 17

Database schema has changed.

§

TooBig = 18

String or BLOB exceeds size limit.

§

Constraint = 19

Constraint violation.

§

Mismatch = 20

Data type mismatch.

§

Misuse = 21

Library used incorrectly.

§

NoLfs = 22

OS feature not available.

§

Auth = 23

Authorization denied.

§

Format = 24

Not used.

§

Range = 25

Bind parameter out of range.

§

NotADb = 26

Not a database file.

§

Notice = 27

Notification (not an error).

§

Warning = 28

Warning (not an error).

§

Row = 100

sqlite3_step() has another row ready.

§

Done = 101

sqlite3_step() has finished executing.

Trait Implementations§

Source§

impl Clone for ErrorCode

Source§

fn clone(&self) -> ErrorCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ErrorCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Hash for ErrorCode

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for ErrorCode

Source§

fn eq(&self, other: &ErrorCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for ErrorCode

Source§

impl Eq for ErrorCode

Source§

impl StructuralPartialEq for ErrorCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.