pub struct FormulaSet {
pub decls: Vec<Decl>,
pub items: Vec<FormulaItem>,
pub uses: Vec<String>,
}Expand description
One piece of formula source = a declaration block + one or more formulas (the “federation” model: later entries may reference the names of earlier ones).
Fields§
§decls: Vec<Decl>§items: Vec<FormulaItem>§uses: Vec<String>Dependencies from use "relative path" (in order of appearance). Parse time only
collects them, no IO is done —
the formula front end is a pure string API; filesystem matters belong to the loader lane.
Implementations§
Source§impl FormulaSet
impl FormulaSet
Sourcepub fn single(&self) -> Result<&Expr, Error>
pub fn single(&self) -> Result<&Expr, Error>
Convenience accessor for a single formula (compatible with old call sites); errors when there are several.
Sourcepub fn into_single(self) -> (Vec<Decl>, Expr)
pub fn into_single(self) -> (Vec<Decl>, Expr)
Single-formula compatibility unwrap: (decls, expr). With several formulas it takes the
last one (federation semantics: the final value).
Callers needing strict single-formula semantics should use single().
Trait Implementations§
Source§impl Clone for FormulaSet
impl Clone for FormulaSet
Source§impl Debug for FormulaSet
impl Debug for FormulaSet
Source§impl Default for FormulaSet
impl Default for FormulaSet
Source§impl PartialEq for FormulaSet
impl PartialEq for FormulaSet
impl StructuralPartialEq for FormulaSet
Auto Trait Implementations§
impl Forget for FormulaSet
impl Freeze for FormulaSet
impl Move for FormulaSet
impl RefUnwindSafe for FormulaSet
impl Send for FormulaSet
impl Sync for FormulaSet
impl Unpin for FormulaSet
impl UnsafeUnpin for FormulaSet
impl UnwindSafe for FormulaSet
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