pub struct ErrorCode(/* private fields */);Expand description
A SQLite error return code.
ErrorCode can also represent an error returned by Squire.
Implementations§
Source§impl ErrorCode
impl ErrorCode
Sourcepub const fn new(code: i32) -> Option<Self>
pub const fn new(code: i32) -> Option<Self>
Wrap a return value from SQLite in an ErrorCode.
Returns None if code is 0.
Sourcepub const unsafe fn new_unchecked(code: i32) -> Self
pub const unsafe fn new_unchecked(code: i32) -> Self
Sourcepub const fn is_squire(&self) -> bool
pub const fn is_squire(&self) -> bool
true if this error code originated from Squire, or a crate it
integrates with.
Sourcepub const fn name(&self) -> Option<&'static str>
pub const fn name(&self) -> Option<&'static str>
The name of the error code constant.
Errors from SQLite have a name starting with SQLITE_.
Errors from Squire have a name starting with SQUIRE_ERROR.
Sourcepub fn description(&self) -> &'static str
pub fn description(&self) -> &'static str
A message describing this error.
Trait Implementations§
impl Copy for ErrorCode
impl Eq for ErrorCode
impl StructuralPartialEq for ErrorCode
Auto Trait Implementations§
impl Freeze for ErrorCode
impl RefUnwindSafe for ErrorCode
impl Send for ErrorCode
impl Sync for ErrorCode
impl Unpin for ErrorCode
impl UnsafeUnpin for ErrorCode
impl UnwindSafe for ErrorCode
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