pub struct CompilerError<Source: 'static + Error = NoSource> { /* private fields */ }Implementations§
Source§impl<Source: 'static + Error> CompilerError<Source>
impl<Source: 'static + Error> CompilerError<Source>
pub fn new<T: ToString>(message: T, line: usize, column: usize) -> Self
pub fn new_message(message: String) -> Self
pub fn append_token_details(self, token: &LexerToken) -> Self
pub fn get_message(&self) -> &String
Trait Implementations§
Source§impl<Source: Clone + 'static + Error> Clone for CompilerError<Source>
impl<Source: Clone + 'static + Error> Clone for CompilerError<Source>
Source§fn clone(&self) -> CompilerError<Source>
fn clone(&self) -> CompilerError<Source>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<Source: 'static + Error> Default for CompilerError<Source>
impl<Source: 'static + Error> Default for CompilerError<Source>
Source§impl<Source: 'static + Error> Display for CompilerError<Source>
impl<Source: 'static + Error> Display for CompilerError<Source>
impl<Source: Eq + 'static + Error> Eq for CompilerError<Source>
Source§impl<Source: 'static + Error> Error for CompilerError<Source>
impl<Source: 'static + Error> Error for CompilerError<Source>
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<Source: 'static + Error> From<CompilerError<Source>> for String
impl<Source: 'static + Error> From<CompilerError<Source>> for String
Source§fn from(e: CompilerError<Source>) -> Self
fn from(e: CompilerError<Source>) -> Self
Converts to this type from the input type.
Source§impl<Source: 'static + Error> From<Source> for CompilerError<Source>
impl<Source: 'static + Error> From<Source> for CompilerError<Source>
impl<Source: PartialEq + 'static + Error> StructuralPartialEq for CompilerError<Source>
Auto Trait Implementations§
impl<Source> Freeze for CompilerError<Source>
impl<Source> RefUnwindSafe for CompilerError<Source>where
Option<Source>: RefUnwindSafe,
impl<Source> Send for CompilerError<Source>
impl<Source> Sync for CompilerError<Source>
impl<Source> Unpin for CompilerError<Source>
impl<Source> UnsafeUnpin for CompilerError<Source>where
Option<Source>: UnsafeUnpin,
impl<Source> UnwindSafe for CompilerError<Source>where
Option<Source>: UnwindSafe,
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