Struct qasmsim::grammar::lexer::LexicalError
source · pub struct LexicalError<Loc> {
pub location: Loc,
}
Expand description
Represent an unrecognized sequence starting at a determined location.
Examples
The following code:
OPENQASM 2.0;
zdef q[10];
Would produce an error like:
use qasmsim::grammar::lexer::LexicalError;
LexicalError::new_at(14);
Fields§
§location: Loc
Location at which the unknown sequence starts.
Implementations§
source§impl<Loc> LexicalError<Loc>
impl<Loc> LexicalError<Loc>
Trait Implementations§
source§impl<Loc: Clone> Clone for LexicalError<Loc>
impl<Loc: Clone> Clone for LexicalError<Loc>
source§fn clone(&self) -> LexicalError<Loc>
fn clone(&self) -> LexicalError<Loc>
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<Loc: Debug> Debug for LexicalError<Loc>
impl<Loc: Debug> Debug for LexicalError<Loc>
source§impl<Loc> Display for LexicalError<Loc>where
Loc: Display,
impl<Loc> Display for LexicalError<Loc>where
Loc: Display,
source§impl<Loc: Ord> Ord for LexicalError<Loc>
impl<Loc: Ord> Ord for LexicalError<Loc>
source§fn cmp(&self, other: &LexicalError<Loc>) -> Ordering
fn cmp(&self, other: &LexicalError<Loc>) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl<Loc: PartialEq> PartialEq for LexicalError<Loc>
impl<Loc: PartialEq> PartialEq for LexicalError<Loc>
source§fn eq(&self, other: &LexicalError<Loc>) -> bool
fn eq(&self, other: &LexicalError<Loc>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl<Loc: PartialOrd> PartialOrd for LexicalError<Loc>
impl<Loc: PartialOrd> PartialOrd for LexicalError<Loc>
source§fn partial_cmp(&self, other: &LexicalError<Loc>) -> Option<Ordering>
fn partial_cmp(&self, other: &LexicalError<Loc>) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl<Loc: Eq> Eq for LexicalError<Loc>
impl<Loc> StructuralEq for LexicalError<Loc>
impl<Loc> StructuralPartialEq for LexicalError<Loc>
Auto Trait Implementations§
impl<Loc> RefUnwindSafe for LexicalError<Loc>where
Loc: RefUnwindSafe,
impl<Loc> Send for LexicalError<Loc>where
Loc: Send,
impl<Loc> Sync for LexicalError<Loc>where
Loc: Sync,
impl<Loc> Unpin for LexicalError<Loc>where
Loc: Unpin,
impl<Loc> UnwindSafe for LexicalError<Loc>where
Loc: 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