pub enum Error {
MissingSemicolon,
UnsupportedVersion,
SourceError,
MissingReal,
MissingInt,
MissingIdentifier,
MissingVersion,
}
Expand description
Represents Errors that can occur during parsing.
The name of each corresponds to the type of error. This enum implements the display trait, thus there is nice outputs when printing:
extern crate qasm;
println!("Got an error: {}", qasm::Error::UnsupportedVersion);
// "Got an error: Unsupported Version. Please Use OpenQASM Version 2.0"
Variants§
MissingSemicolon
UnsupportedVersion
SourceError
MissingReal
MissingInt
MissingIdentifier
MissingVersion
Trait Implementations§
impl Copy for Error
impl StructuralPartialEq for Error
Auto Trait Implementations§
impl Freeze for Error
impl RefUnwindSafe for Error
impl Send for Error
impl Sync for Error
impl Unpin for Error
impl UnwindSafe for Error
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