pub struct FormulaEngine<T> { /* private fields */ }Expand description
FormulaEngine holds the parsed expression and can calculate the result based on the provided component values.
Implementations§
Source§impl<T: FromStr + NumberLike<T> + PartialOrd> FormulaEngine<T>
impl<T: FromStr + NumberLike<T> + PartialOrd> FormulaEngine<T>
Sourcepub fn try_new(s: &str) -> Result<Self, FormulaError>
pub fn try_new(s: &str) -> Result<Self, FormulaError>
Create a new FormulaEngine from a formula string.
Sourcepub fn components(&self) -> &HashSet<u64>
pub fn components(&self) -> &HashSet<u64>
Get the components of the formula.
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for FormulaEngine<T>where
T: Freeze,
impl<T> RefUnwindSafe for FormulaEngine<T>where
T: RefUnwindSafe,
impl<T> Send for FormulaEngine<T>where
T: Send,
impl<T> Sync for FormulaEngine<T>where
T: Sync,
impl<T> Unpin for FormulaEngine<T>where
T: Unpin,
impl<T> UnwindSafe for FormulaEngine<T>where
T: UnwindSafe,
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