pub struct OpyError {
pub code: String,
pub message: String,
pub span: Option<Span>,
}Expand description
A structured frontend error.
Fields§
§code: StringA stable machine-readable code, e.g. parse-error.
message: StringHuman-readable message (not part of the machine contract).
span: Option<Span>The offending source region, when known.
Implementations§
Trait Implementations§
impl Eq for OpyError
Source§impl Error for OpyError
impl Error for OpyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
impl StructuralPartialEq for OpyError
Auto Trait Implementations§
impl Freeze for OpyError
impl RefUnwindSafe for OpyError
impl Send for OpyError
impl Sync for OpyError
impl Unpin for OpyError
impl UnsafeUnpin for OpyError
impl UnwindSafe for OpyError
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