pub struct FormulaError { /* private fields */ }Expand description
The error type when evaluating a state trace using a Predicate.
Implementations§
Source§impl FormulaError
impl FormulaError
Sourcepub fn new(time: f64, error: EvaluationError) -> Self
pub fn new(time: f64, error: EvaluationError) -> Self
Create a new evaluation error for a given time.
§Example
use banquo::predicate::{EvaluationError, FormulaError};
let err = FormulaError::new(1.0, EvaluationError::missing("x"));Sourcepub fn time(&self) -> f64
pub fn time(&self) -> f64
Returns the time of the state that produced the EvaluationError.
Sourcepub fn error(&self) -> &EvaluationError
pub fn error(&self) -> &EvaluationError
Returns a reference to the EvaluationError that was generated.
Trait Implementations§
Source§impl Clone for FormulaError
impl Clone for FormulaError
Source§fn clone(&self) -> FormulaError
fn clone(&self) -> FormulaError
Returns a duplicate 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 Debug for FormulaError
impl Debug for FormulaError
Source§impl Display for FormulaError
impl Display for FormulaError
Source§impl Error for FormulaError
impl Error for FormulaError
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()
Auto Trait Implementations§
impl Freeze for FormulaError
impl RefUnwindSafe for FormulaError
impl Send for FormulaError
impl Sync for FormulaError
impl Unpin for FormulaError
impl UnwindSafe for FormulaError
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