pub struct ErrorExplanation {
pub code: &'static str,
pub title: &'static str,
pub explanation: &'static str,
pub example: Option<&'static str>,
pub correct_example: Option<&'static str>,
pub doc_link: Option<&'static str>,
pub related_codes: &'static [&'static str],
pub common_mistakes: &'static [CommonMistake],
}Expand description
An error code explanation.
Fields§
§code: &'static strThe error code.
title: &'static strA brief title for the error.
explanation: &'static strA detailed explanation.
example: Option<&'static str>Example code that triggers this error.
correct_example: Option<&'static str>Example of the correct code.
doc_link: Option<&'static str>Link to related documentation.
Related error codes that might be relevant.
common_mistakes: &'static [CommonMistake]Common mistake patterns that lead to this error.
Trait Implementations§
Source§impl Clone for ErrorExplanation
impl Clone for ErrorExplanation
Source§fn clone(&self) -> ErrorExplanation
fn clone(&self) -> ErrorExplanation
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ErrorExplanation
impl RefUnwindSafe for ErrorExplanation
impl Send for ErrorExplanation
impl Sync for ErrorExplanation
impl Unpin for ErrorExplanation
impl UnsafeUnpin for ErrorExplanation
impl UnwindSafe for ErrorExplanation
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