pub struct Runtime {
pub structures: BTreeMap<String, Structure>,
}Fields§
§structures: BTreeMap<String, Structure>Implementations§
Source§impl Runtime
impl Runtime
Sourcepub fn eval(&self, expression: Expression) -> Expression
pub fn eval(&self, expression: Expression) -> Expression
Returns the lowest possible evaluation
Sourcepub fn evaluations(&self, expression: Expression) -> BTreeSet<Expression>
pub fn evaluations(&self, expression: Expression) -> BTreeSet<Expression>
Returns a set of all possible evaluations
Source§impl Runtime
impl Runtime
pub fn new(structures: BTreeMap<String, Structure>) -> Self
Sourcepub fn domain(&self) -> impl Iterator<Item = &String> + '_
pub fn domain(&self) -> impl Iterator<Item = &String> + '_
Iterator that goes through each element in the domains of the structures of the runtime
Sourcepub fn reserved(&self) -> impl Iterator<Item = &String> + '_
pub fn reserved(&self) -> impl Iterator<Item = &String> + '_
Iterator that goes through each literal in the reserved keywords of the structures of the runtime
Sourcepub fn definitions(&self) -> impl Iterator<Item = &Definition> + '_
pub fn definitions(&self) -> impl Iterator<Item = &Definition> + '_
Iterator that goes through each literal in the reserved keywords of the structures of the runtime
pub fn contains(&self, name: &str) -> bool
pub fn insert( &mut self, name: String, structure: Structure, ) -> Option<Structure>
pub fn from_partial(structures: &BTreeMap<String, Option<Structure>>) -> Self
pub fn parse_expression( &self, expression: &str, ) -> Result<Expression, ParseError>
Trait Implementations§
impl Eq for Runtime
impl StructuralPartialEq for Runtime
Auto Trait Implementations§
impl Freeze for Runtime
impl RefUnwindSafe for Runtime
impl Send for Runtime
impl Sync for Runtime
impl Unpin for Runtime
impl UnwindSafe for Runtime
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