pub struct FormulaBindings {
pub constants: Vec<(String, String)>,
pub expressions: Vec<(String, String)>,
}Expand description
Named literals and sub-formulas declared alongside a formula.
GenApi lets a <SwissKnife>, <IntSwissKnife> or <Converter> name parts
of its own formula:
<Constant Name="TEN">10</Constant>
<Expression Name="XPLUS2">TEN + X</Expression>
<Formula>TEN * XPLUS2</Formula>Both are resolved by substitution when the runtime builds the node, so the
evaluator never sees them. Declaration order matters: an <Expression> may
refer to constants and to expressions declared before it.
Fields§
§constants: Vec<(String, String)><Constant Name="..">literal</Constant> pairs, in declaration order.
expressions: Vec<(String, String)><Expression Name="..">formula</Expression> pairs, in declaration order.
Implementations§
Trait Implementations§
Source§impl Clone for FormulaBindings
impl Clone for FormulaBindings
Source§fn clone(&self) -> FormulaBindings
fn clone(&self) -> FormulaBindings
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 FormulaBindings
impl Debug for FormulaBindings
Source§impl Default for FormulaBindings
impl Default for FormulaBindings
Source§fn default() -> FormulaBindings
fn default() -> FormulaBindings
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for FormulaBindings
impl<'de> Deserialize<'de> for FormulaBindings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for FormulaBindings
impl PartialEq for FormulaBindings
Source§fn eq(&self, other: &FormulaBindings) -> bool
fn eq(&self, other: &FormulaBindings) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl Serialize for FormulaBindings
impl Serialize for FormulaBindings
impl Eq for FormulaBindings
impl StructuralPartialEq for FormulaBindings
Auto Trait Implementations§
impl Freeze for FormulaBindings
impl RefUnwindSafe for FormulaBindings
impl Send for FormulaBindings
impl Sync for FormulaBindings
impl Unpin for FormulaBindings
impl UnsafeUnpin for FormulaBindings
impl UnwindSafe for FormulaBindings
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.