pub struct IonError {
pub kind: ErrorKind,
pub message: String,
pub line: usize,
pub col: usize,
pub additional: Vec<IonError>,
}Fields§
§kind: ErrorKind§message: String§line: usize§col: usize§additional: Vec<IonError>Additional errors (for multi-error reporting from parser).
Implementations§
Source§impl IonError
impl IonError
Sourcepub fn format_with_source(&self, source: &str) -> String
pub fn format_with_source(&self, source: &str) -> String
Format error with source context showing the offending line.
pub fn lex(message: impl Into<String>, line: usize, col: usize) -> Self
pub fn parse(message: impl Into<String>, line: usize, col: usize) -> Self
pub fn runtime(message: impl Into<String>, line: usize, col: usize) -> Self
pub fn type_err(message: impl Into<String>, line: usize, col: usize) -> Self
pub fn name(message: impl Into<String>, line: usize, col: usize) -> Self
pub fn propagated_err( message: impl Into<String>, line: usize, col: usize, ) -> Self
pub fn propagated_none(line: usize, col: usize) -> Self
Trait Implementations§
Source§impl Error for IonError
impl Error for IonError
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()
Auto Trait Implementations§
impl Freeze for IonError
impl RefUnwindSafe for IonError
impl Send for IonError
impl Sync for IonError
impl Unpin for IonError
impl UnsafeUnpin for IonError
impl UnwindSafe for IonError
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