Enum quil_rs::program::ProgramError
source · pub enum ProgramError<T> {
InvalidCalibration {
instruction: Instruction,
message: String,
},
RecursiveCalibration(Instruction),
Syntax(SyntaxError<T>),
}
Expand description
Errors that may occur while parsing a Program
.
Variants§
Implementations§
source§impl<T> ProgramError<T>
impl<T> ProgramError<T>
sourcepub fn map_parsed<T2>(self, map: impl Fn(T) -> T2) -> ProgramError<T2>
pub fn map_parsed<T2>(self, map: impl Fn(T) -> T2) -> ProgramError<T2>
Convert the parsed output into another type.
This delegates to [LeftoverError::map_parsed
] when a [ProgramError::Leftover
] and does
nothing but change the type signature otherwise.
Trait Implementations§
source§impl<T: Debug> Debug for ProgramError<T>
impl<T: Debug> Debug for ProgramError<T>
source§impl<T> Display for ProgramError<T>where
T: Debug + 'static,
impl<T> Display for ProgramError<T>where T: Debug + 'static,
source§impl<T> Error for ProgramError<T>where
T: Debug + 'static,
impl<T> Error for ProgramError<T>where T: Debug + 'static,
source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
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<T> From<SyntaxError<T>> for ProgramError<T>
impl<T> From<SyntaxError<T>> for ProgramError<T>
source§fn from(err: SyntaxError<T>) -> Self
fn from(err: SyntaxError<T>) -> Self
Converts to this type from the input type.
source§impl<T: PartialEq> PartialEq<ProgramError<T>> for ProgramError<T>
impl<T: PartialEq> PartialEq<ProgramError<T>> for ProgramError<T>
source§fn eq(&self, other: &ProgramError<T>) -> bool
fn eq(&self, other: &ProgramError<T>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.