pub struct Failure {
pub message: String,
pub offset: Option<u32>,
pub compiling: bool,
pub error: Option<DbError>,
}Expand description
Why a statement did not produce rows.
Fields§
§message: StringWhat went wrong.
offset: Option<u32>Where in the statement, when the failure knows.
compiling: boolWhether it failed to compile rather than while running.
error: Option<DbError>The engine’s own error, kept so a caller can classify it.
The message is not the classification. The command layer
has to tell a caller whether a statement was refused because the engine
has not built the construct - the driver’s unsupported - or because it
was mistyped, and drivers/README.md argues at length for why folding
those two together throws the design away. Only the DbError knows:
unsupported() is a field on it, and the primary code separates a
constraint from a busy file from corruption. Rendering it to a sentence
here and matching on the sentence there would be a second, worse
classifier beside the driver’s.
Auto Trait Implementations§
impl Freeze for Failure
impl RefUnwindSafe for Failure
impl Send for Failure
impl Sync for Failure
impl Unpin for Failure
impl UnsafeUnpin for Failure
impl UnwindSafe for Failure
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more