pub enum DrizzleError {
Show 19 variants
ExecutionError(CompactString),
PrepareError(CompactString),
NotFound,
TransactionError(CompactString),
Mapping(CompactString),
Statement(CompactString),
Query(CompactString),
QueryFailed {
ctx: Box<QueryContext>,
source: Box<DrizzleError>,
},
ParameterError(CompactString),
TryFromInt(TryFromIntError),
ParseInt(ParseIntError),
ParseFloat(ParseFloatError),
ParseBool(ParseBoolError),
ConversionError(CompactString),
Schema(CompactString),
UnsafeMigrationRepair {
tag: CompactString,
reason: CompactString,
},
UnsupportedMigrationExecution {
adapter: CompactString,
requirement: CompactString,
},
Other(CompactString),
Infallible(Infallible),
}Expand description
Every error a Drizzle query, conversion or migration can return.
Driver errors are wrapped in a variant for that driver when its feature
is enabled. DrizzleError::QueryFailed adds the failing SQL and
parameters to another error.
Variants§
ExecutionError(CompactString)
The statement failed to execute.
PrepareError(CompactString)
The statement failed to prepare.
NotFound
No row was returned where one was expected (for example by .get()).
TransactionError(CompactString)
A transaction could not begin, commit or roll back.
Mapping(CompactString)
A row could not be mapped to the target type.
Statement(CompactString)
The statement is invalid.
Query(CompactString)
The query is invalid.
QueryFailed
Another error, with the SQL and parameters of the query that caused it.
Fields
ctx: Box<QueryContext>Captured SQL and parameter context.
source: Box<DrizzleError>Original error.
ParameterError(CompactString)
Parameters could not be bound: missing, duplicate or unexpected bindings, or a value that could not be converted.
TryFromInt(TryFromIntError)
An integer did not fit the target type.
ParseInt(ParseIntError)
Text could not be parsed as an integer.
ParseFloat(ParseFloatError)
Text could not be parsed as a float.
ParseBool(ParseBoolError)
Text could not be parsed as a boolean.
ConversionError(CompactString)
A value could not be converted to the requested type.
Schema(CompactString)
The schema is invalid (for example a cycle in table dependencies).
UnsafeMigrationRepair
A dirty migration cannot be repaired without violating its execution safety contract.
Fields
tag: CompactStringMigration tag recorded in the tracking table.
reason: CompactStringSafety requirement that prevents automatic repair.
UnsupportedMigrationExecution
The selected adapter cannot provide a migration’s required execution semantics.
Fields
adapter: CompactStringRuntime adapter that cannot provide the required semantics.
requirement: CompactStringMigration execution capability the adapter does not provide.
Other(CompactString)
Any other error.
Infallible(Infallible)
Never constructed; lets ? work on infallible conversions.
Trait Implementations§
Source§impl Debug for DrizzleError
impl Debug for DrizzleError
Source§impl Display for DrizzleError
impl Display for DrizzleError
Source§impl Error for DrizzleError
impl Error for DrizzleError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<!> for DrizzleError
impl From<!> for DrizzleError
Source§fn from(source: Infallible) -> Self
fn from(source: Infallible) -> Self
Source§impl From<ParseBoolError> for DrizzleError
impl From<ParseBoolError> for DrizzleError
Source§fn from(source: ParseBoolError) -> Self
fn from(source: ParseBoolError) -> Self
Source§impl From<ParseFloatError> for DrizzleError
impl From<ParseFloatError> for DrizzleError
Source§fn from(source: ParseFloatError) -> Self
fn from(source: ParseFloatError) -> Self
Source§impl From<ParseIntError> for DrizzleError
impl From<ParseIntError> for DrizzleError
Source§fn from(source: ParseIntError) -> Self
fn from(source: ParseIntError) -> Self
Source§impl From<TryFromIntError> for DrizzleError
impl From<TryFromIntError> for DrizzleError
Source§fn from(source: TryFromIntError) -> Self
fn from(source: TryFromIntError) -> Self
Auto Trait Implementations§
impl Freeze for DrizzleError
impl RefUnwindSafe for DrizzleError
impl Send for DrizzleError
impl Sync for DrizzleError
impl Unpin for DrizzleError
impl UnsafeUnpin for DrizzleError
impl UnwindSafe for DrizzleError
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
impl<List> ListIncludes<Nil, ()> for List
impl<Mk> MarkerAggValidFor<()> for Mk
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
CompactString. Read more