pub struct ErrorContext {
pub operation: Option<String>,
pub model: Option<String>,
pub field: Option<String>,
pub sql: Option<String>,
pub suggestions: Vec<Suggestion>,
pub help: Option<String>,
pub related: Vec<String>,
}Expand description
Additional context for an error.
Fields§
§operation: Option<String>The operation that was being performed.
model: Option<String>The model involved.
field: Option<String>The field involved.
sql: Option<String>The SQL query (if available).
suggestions: Vec<Suggestion>Suggestions for fixing the error.
help: Option<String>Help text.
Related errors.
Implementations§
Source§impl ErrorContext
impl ErrorContext
Sourcepub fn suggestion(self, suggestion: Suggestion) -> Self
pub fn suggestion(self, suggestion: Suggestion) -> Self
Add a suggestion.
Trait Implementations§
Source§impl Clone for ErrorContext
impl Clone for ErrorContext
Source§impl Debug for ErrorContext
impl Debug for ErrorContext
Auto Trait Implementations§
impl Forget for ErrorContext
impl Freeze for ErrorContext
impl Move for ErrorContext
impl RefUnwindSafe for ErrorContext
impl Send for ErrorContext
impl Sync for ErrorContext
impl Unpin for ErrorContext
impl UnsafeUnpin for ErrorContext
impl UnwindSafe for ErrorContext
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