Struct nyar_error::SyntaxError
source · pub struct SyntaxError {
pub info: String,
pub hint: String,
pub span: FileSpan,
}
Fields§
§info: String
§hint: String
§span: FileSpan
Implementations§
source§impl SyntaxError
impl SyntaxError
sourcepub fn with_range(self, range: &Range<u32>) -> Self
pub fn with_range(self, range: &Range<u32>) -> Self
Set the file range
source§impl SyntaxError
impl SyntaxError
pub fn as_error(self, kind: ReportKind) -> NyarError
pub fn as_report(&self, kind: ReportKind) -> Diagnostic
Trait Implementations§
source§impl Clone for SyntaxError
impl Clone for SyntaxError
source§fn clone(&self) -> SyntaxError
fn clone(&self) -> SyntaxError
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for SyntaxError
impl Debug for SyntaxError
source§impl Display for SyntaxError
impl Display for SyntaxError
source§impl From<ParseIntError> for SyntaxError
impl From<ParseIntError> for SyntaxError
source§fn from(error: ParseIntError) -> Self
fn from(error: ParseIntError) -> Self
Converts to this type from the input type.
source§impl From<SyntaxError> for NyarError
impl From<SyntaxError> for NyarError
source§fn from(value: SyntaxError) -> Self
fn from(value: SyntaxError) -> Self
Converts to this type from the input type.
source§impl PartialEq for SyntaxError
impl PartialEq for SyntaxError
source§fn eq(&self, other: &SyntaxError) -> bool
fn eq(&self, other: &SyntaxError) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for SyntaxError
impl StructuralEq for SyntaxError
impl StructuralPartialEq for SyntaxError
Auto Trait Implementations§
impl RefUnwindSafe for SyntaxError
impl Send for SyntaxError
impl Sync for SyntaxError
impl Unpin for SyntaxError
impl UnwindSafe for SyntaxError
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