pub enum Error {
Utf8Error(Utf8Error),
Fmt(Error),
Io(Error),
Sqlite(Error),
FromSql(FromSqlError),
ParamCountMismatch {
expected: usize,
actual: usize,
},
RowCountMismatch {
expected: RowCount,
actual: RowCount,
},
ColumnCountMismatch {
expected: usize,
actual: usize,
},
UnknownParam(Cow<'static, str>),
Other(Box<dyn StdError + Send + Sync + 'static>),
}Expand description
NanoSQL errors.
Variants§
Utf8Error(Utf8Error)
Fmt(Error)
Io(Error)
Sqlite(Error)
FromSql(FromSqlError)
ParamCountMismatch
RowCountMismatch
ColumnCountMismatch
UnknownParam(Cow<'static, str>)
Other(Box<dyn StdError + Send + Sync + 'static>)
Implementations§
Source§impl Error
impl Error
Sourcepub fn unknown_param(name: &'static str) -> Self
pub fn unknown_param(name: &'static str) -> Self
Creates an UnknownParam error from a statically-known parameter name.
Sourcepub fn unknown_param_dyn<T: Display>(message: T) -> Self
pub fn unknown_param_dyn<T: Display>(message: T) -> Self
Creates an UnknownParam error from a dynamic parameter name.
Trait Implementations§
Source§impl Error for Error
impl Error for Error
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Source§impl From<FromSqlError> for Error
impl From<FromSqlError> for Error
Source§fn from(source: FromSqlError) -> Self
fn from(source: FromSqlError) -> Self
Converts to this type from the input type.
Source§impl From<QueryPlanBuildError> for Error
impl From<QueryPlanBuildError> for Error
Source§fn from(reason: QueryPlanBuildError) -> Self
fn from(reason: QueryPlanBuildError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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