pub enum EvaluationError<'error> {
CompilationFailed,
OptimizationFailed,
BadArity {
expected: usize,
given: usize,
},
UnrecognizedExternal(&'error str),
}Expand description
An error that may occur during the evaluation of a dice expression. Note that evaluation itself never causes an error, but setup may fail.
Variants§
CompilationFailed
The function could not be compiled. Produced only by the simple one-shot evaluator.
OptimizationFailed
The function could not be optimized. Produced only by the simple one-shot evaluator.
BadArity
The number of arguments provided to a function does not match the number of parameters expected.
Fields
UnrecognizedExternal(&'error str)
An external variable was not recognized.
Trait Implementations§
Source§impl<'error> Clone for EvaluationError<'error>
impl<'error> Clone for EvaluationError<'error>
Source§fn clone(&self) -> EvaluationError<'error>
fn clone(&self) -> EvaluationError<'error>
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<'error> Debug for EvaluationError<'error>
impl<'error> Debug for EvaluationError<'error>
Source§impl Display for EvaluationError<'_>
impl Display for EvaluationError<'_>
Source§impl Error for EvaluationError<'_>
impl Error for EvaluationError<'_>
1.30.0 · 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 From<CompilationError> for EvaluationError<'static>
impl From<CompilationError> for EvaluationError<'static>
Source§fn from(e: CompilationError) -> Self
fn from(e: CompilationError) -> Self
Converts to this type from the input type.
Source§impl<'error> PartialEq for EvaluationError<'error>
impl<'error> PartialEq for EvaluationError<'error>
impl<'error> Copy for EvaluationError<'error>
impl<'error> Eq for EvaluationError<'error>
impl<'error> StructuralPartialEq for EvaluationError<'error>
Auto Trait Implementations§
impl<'error> Freeze for EvaluationError<'error>
impl<'error> RefUnwindSafe for EvaluationError<'error>
impl<'error> Send for EvaluationError<'error>
impl<'error> Sync for EvaluationError<'error>
impl<'error> Unpin for EvaluationError<'error>
impl<'error> UnwindSafe for EvaluationError<'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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more