Struct lamcal::ParseError [−][src]
pub struct ParseError { /* fields omitted */ }
An error that occurs during parsing of expressions.
Methods
impl ParseError
[src]
impl ParseError
pub fn new(
kind: ParseErrorKind,
position: CharPosition,
found: impl Display,
expected: impl Display,
hint: Option<Hint>
) -> Self
[src]
pub fn new(
kind: ParseErrorKind,
position: CharPosition,
found: impl Display,
expected: impl Display,
hint: Option<Hint>
) -> Self
Constructs a new ParseError
with the given information.
pub fn kind(&self) -> ParseErrorKind
[src]
pub fn kind(&self) -> ParseErrorKind
Returns the kind of error that has been found.
pub fn position(&self) -> CharPosition
[src]
pub fn position(&self) -> CharPosition
Returns the position in the input stream, where the error has been found.
pub fn found(&self) -> &str
[src]
pub fn found(&self) -> &str
Returns the slice of the expression which causes the error.
pub fn expected(&self) -> &str
[src]
pub fn expected(&self) -> &str
Returns a description of what is expected to form a correct expression.
pub fn hint(&self) -> Option<&Hint>
[src]
pub fn hint(&self) -> Option<&Hint>
Returns an additional hint for finding and fixing the error.
The hint is optional. So some errors might not have a hint for you.
Trait Implementations
impl Debug for ParseError
[src]
impl Debug for ParseError
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Clone for ParseError
[src]
impl Clone for ParseError
fn clone(&self) -> ParseError
[src]
fn clone(&self) -> ParseError
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl PartialEq for ParseError
[src]
impl PartialEq for ParseError
fn eq(&self, other: &ParseError) -> bool
[src]
fn eq(&self, other: &ParseError) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, other: &ParseError) -> bool
[src]
fn ne(&self, other: &ParseError) -> bool
This method tests for !=
.
impl Display for ParseError
[src]
impl Display for ParseError
Auto Trait Implementations
impl Send for ParseError
impl Send for ParseError
impl Sync for ParseError
impl Sync for ParseError