pub struct DatabaseFailure {
pub message: String,
pub code: Option<String>,
pub position: Option<DatabasePosition>,
}Expand description
Stable database error information supplied by an executor.
Executors preserve only fields emitted directly by their database driver. They never attach the submitted SQL text, which can be arbitrarily large or sensitive.
Fields§
§message: StringConcise database-provided failure message.
code: Option<String>Optional database error code, such as a PostgreSQL SQLSTATE.
position: Option<DatabasePosition>Optional driver-provided character position.
Implementations§
Source§impl DatabaseFailure
impl DatabaseFailure
Sourcepub fn message(message: impl Into<String>) -> Self
pub fn message(message: impl Into<String>) -> Self
Creates a database failure without a database-specific code or position.
Sourcepub fn with_position(self, position: DatabasePosition) -> Self
pub fn with_position(self, position: DatabasePosition) -> Self
Adds a driver-provided character position.
Trait Implementations§
Source§impl Clone for DatabaseFailure
impl Clone for DatabaseFailure
Source§impl Debug for DatabaseFailure
impl Debug for DatabaseFailure
Source§impl Display for DatabaseFailure
impl Display for DatabaseFailure
impl Eq for DatabaseFailure
Source§impl PartialEq for DatabaseFailure
impl PartialEq for DatabaseFailure
impl StructuralPartialEq for DatabaseFailure
Auto Trait Implementations§
impl Forget for DatabaseFailure
impl Freeze for DatabaseFailure
impl Move for DatabaseFailure
impl RefUnwindSafe for DatabaseFailure
impl Send for DatabaseFailure
impl Sync for DatabaseFailure
impl Unpin for DatabaseFailure
impl UnsafeUnpin for DatabaseFailure
impl UnwindSafe for DatabaseFailure
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.