Enum RsqliteError

Source
pub enum RsqliteError {
Show 26 variants InvalidCString(NulError), Abort, Auth, Busy, CantOpen, Constraint, Corrupt, Error, Full, Internal, Interrupt, IOerr, Locked, Mismatch, Misuse, Nolfs, Nomem, Notadb, Notfound, Perm, Protocol, Range, Readonly, Schema, Toobig, Unknown(c_int),
}

Variants§

§

InvalidCString(NulError)

Can not convert the provided String into a CString

§

Abort

SQLITE_ABORT: An operation was aborted prior to completion

§

Auth

SQLITE_AUTH: An SQL statement being prepared is not authorized.

§

Busy

SQLITE_BUSY: The database file could not be written (or in some cases read).

§

CantOpen

SQLITE_CANTOPEN: SQLite was unable to open a file.

§

Constraint

SQLITE_CONSTRAINT: An SQL constraint violation occurred.

§

Corrupt

SQLITE_CORRUPT: The database file has been corrupted.

§

Error

SQLITE_ERROR: Sqlite generic error code.

§

Full

SQLITE_FULL: A write could not complete because the disk is full.

§

Internal

SQLITE_INTERNAL: An internal malfunction. you should never see this.

§

Interrupt

SQLITE_INTERRUPT: An operation was interrupted.

§

IOerr

SQLITE_IOERR: Operation did not finish because the OS reported an I/O error.

§

Locked

SQLITE_LOCKED: 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.

§

Mismatch

SQLITE_MISMATCH: This error code indicates a datatype mismatch.

§

Misuse

SQLITE_MISUSE: SQLite interface was used in an undefined or unsupported way.

§

Nolfs

SQLITE_NOLFS: System does not support large files, or the database grew to be larger than what the filesystem can handle.

§

Nomem

SQLITE_NOMEM: SQLite was unable to allocate all the memory
it needed to complete the operation.

§

Notadb

SQLITE_NOTADB: The file being opened does not appear to be an SQLite database file.

§

Notfound

SQLITE_NOTFOUND: See https://sqlite.org/rescode.html

§

Perm

SQLITE_PERM: The requested access mode for a newly created database could not be provided.

§

Protocol

SQLITE_PROTOCOL: A problem with the file locking protocol used by SQLite.

§

Range

SQLITE_RANGE: 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.

§

Readonly

SQLITE_READONLY: An attempt was made to alter some data for which the current database connection does not have write permission.

§

Schema

SQLITE_SCHEMA: The database schema was changed by some other process in between the time that the statement was prepared and the time the statement was run.

§

Toobig

SQLITE_TOOBIG: A string or BLOB was too large.

§

Unknown(c_int)

Unknown SQLITE error, See https://sqlite.org/rescode.html

Trait Implementations§

Source§

impl Debug for RsqliteError

Source§

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

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

impl Display for RsqliteError

Source§

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

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

impl Error for RsqliteError

Source§

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

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl From<NulError> for RsqliteError

Source§

fn from(source: NulError) -> Self

Converts to this type from the input type.
Source§

impl From<i32> for RsqliteError

Source§

fn from(ecode: c_int) -> Self

Converts to this type from the input type.

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> 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> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. 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.