Trait ToFormula

Source
pub trait ToFormula {
    // Required method
    fn to_formula(&self, f: &FormulaFactory) -> EncodedFormula;
}
Expand description

Trait for converting a type into a formula of the given FormulaFactory.

Required Methods§

Source

fn to_formula(&self, f: &FormulaFactory) -> EncodedFormula

Converts self into a formula of f.

Implementations on Foreign Types§

Source§

impl ToFormula for str

Source§

fn to_formula(&self, f: &FormulaFactory) -> EncodedFormula

Parses a string into a Formula.

It only work if the passed string also is a valid function. So you need to be sure, that the input string is valid. If you are not sure, whether the input is a valid formula, you should use parse

§Panic

This function panics if input string is not a valid formula.

Implementors§