#[non_exhaustive]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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.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§impl Debug for FormulaBindings
impl Debug for FormulaBindings
Source§impl Default for FormulaBindings
impl Default for FormulaBindings
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
impl Eq for FormulaBindings
Source§impl PartialEq for FormulaBindings
impl PartialEq for FormulaBindings
Source§impl Serialize for FormulaBindings
impl Serialize 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