pub enum ParseProgramError<T> {
InvalidCalibration {
instruction: Instruction,
message: String,
},
Syntax(SyntaxError<T>),
}
Expand description
Errors that may occur while parsing a Program
.
Variants§
Implementations§
Source§impl<T> ParseProgramError<T>
impl<T> ParseProgramError<T>
Sourcepub fn map_parsed<T2>(self, map: impl Fn(T) -> T2) -> ParseProgramError<T2>
pub fn map_parsed<T2>(self, map: impl Fn(T) -> T2) -> ParseProgramError<T2>
Convert the parsed output into another type.
Trait Implementations§
Source§impl<T: Clone> Clone for ParseProgramError<T>
impl<T: Clone> Clone for ParseProgramError<T>
Source§fn clone(&self) -> ParseProgramError<T>
fn clone(&self) -> ParseProgramError<T>
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<T: Debug> Debug for ParseProgramError<T>
impl<T: Debug> Debug for ParseProgramError<T>
Source§impl<T> Display for ParseProgramError<T>where
T: Debug + 'static,
impl<T> Display for ParseProgramError<T>where
T: Debug + 'static,
Source§impl<T> Error for ParseProgramError<T>where
T: Debug + 'static,
impl<T> Error for ParseProgramError<T>where
T: Debug + 'static,
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<T> From<LeftoverError<T>> for ParseProgramError<T>
impl<T> From<LeftoverError<T>> for ParseProgramError<T>
Source§fn from(err: LeftoverError<T>) -> Self
fn from(err: LeftoverError<T>) -> Self
Converts to this type from the input type.
Source§impl From<ParseProgramError<Program>> for ProgramError
impl From<ParseProgramError<Program>> for ProgramError
Source§fn from(source: ParseProgramError<Program>) -> Self
fn from(source: ParseProgramError<Program>) -> Self
Converts to this type from the input type.
Source§impl<T> From<SyntaxError<T>> for ParseProgramError<T>
impl<T> From<SyntaxError<T>> for ParseProgramError<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 for ParseProgramError<T>
impl<T: PartialEq> PartialEq for ParseProgramError<T>
impl<T> StructuralPartialEq for ParseProgramError<T>
Auto Trait Implementations§
impl<T> Freeze for ParseProgramError<T>where
T: Freeze,
impl<T> !RefUnwindSafe for ParseProgramError<T>
impl<T> Send for ParseProgramError<T>where
T: Send,
impl<T> Sync for ParseProgramError<T>where
T: Sync,
impl<T> Unpin for ParseProgramError<T>where
T: Unpin,
impl<T> !UnwindSafe for ParseProgramError<T>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.