pub struct Error {
pub variant: ErrorVariant,
pub file_path: String,
pub notes: Vec<ErrorNote>,
}Fields§
§variant: ErrorVariantThe variant of the error.
file_path: StringThe source text where the error occurred. Typically this field is filled at a second stage.
notes: Vec<ErrorNote>Implementations§
source§impl Error
impl Error
pub fn new(variant: ErrorVariant) -> Self
pub fn invalid_arguments(note: &str, range: Option<Range>) -> Self
pub fn poisoned_lock(note: &str, range: Option<Range>) -> Self
pub fn undefined_function( symbol: &str, method: &str, note: &str, range: Option<Range> ) -> Self
pub fn undefined_symbol(symbol: &str, note: &str, range: Option<Range>) -> Self
pub fn not_invocable(note: &str, range: Option<Range>) -> Self
pub fn failed_use(url: &str, source_errors: Vec<Error>) -> Self
pub fn general(text: &str) -> Self
pub fn return_cf(value: Expr) -> Self
pub fn break_cf(value: Expr) -> Self
pub fn continue_cf() -> Self
pub fn variant(&self) -> &ErrorVariant
pub fn code(&self) -> u32
pub fn has_file_path(&self) -> bool
pub fn push_note(&mut self, note: &str, range: Option<Range>)
pub fn range(&self) -> Option<&Range>
Trait Implementations§
source§impl Error for Error
impl Error for Error
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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()
Auto Trait Implementations§
impl Freeze for Error
impl !RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl !UnwindSafe for Error
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