pub struct SyntaxError<'a> {
pub source: SourceRange<'a>,
pub typ: SyntaxErrorType,
pub actual_token: Option<TokenType>,
}
Fields§
§source: SourceRange<'a>
§typ: SyntaxErrorType
§actual_token: Option<TokenType>
Implementations§
Source§impl<'a> SyntaxError<'a>
impl<'a> SyntaxError<'a>
pub fn new( typ: SyntaxErrorType, source: SourceRange<'a>, actual_token: Option<TokenType>, ) -> SyntaxError<'a>
pub fn from_loc( loc: SourceRange<'a>, typ: SyntaxErrorType, actual_token: Option<TokenType>, ) -> SyntaxError<'a>
Trait Implementations§
Source§impl<'a> Clone for SyntaxError<'a>
impl<'a> Clone for SyntaxError<'a>
Source§fn clone(&self) -> SyntaxError<'a>
fn clone(&self) -> SyntaxError<'a>
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<'a> Debug for SyntaxError<'a>
impl<'a> Debug for SyntaxError<'a>
Source§impl<'a> Display for SyntaxError<'a>
impl<'a> Display for SyntaxError<'a>
Source§impl<'a> Error for SyntaxError<'a>
impl<'a> Error for SyntaxError<'a>
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()
Source§impl<'a> PartialEq for SyntaxError<'a>
impl<'a> PartialEq for SyntaxError<'a>
impl<'a> Eq for SyntaxError<'a>
Auto Trait Implementations§
impl<'a> Freeze for SyntaxError<'a>
impl<'a> RefUnwindSafe for SyntaxError<'a>
impl<'a> !Send for SyntaxError<'a>
impl<'a> !Sync for SyntaxError<'a>
impl<'a> Unpin for SyntaxError<'a>
impl<'a> UnwindSafe for SyntaxError<'a>
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