metrics_evaluation 0.1.2

Small foot-print parser and solver for (nested) text-based comparisons
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use crate::compare::{Comparison, Logic};

/// An entity in a [Sequence] which can be a another [Sequence] [Entity::Child] or a ComparisonType (Value or Variable) [Entity::Comparison],
pub enum Entity {
    /// Another sequence which is encapsulated by the current sequence
    Child(Sequence, Option<Logic>),
    /// A comparison on the current layer
    Comparison(Comparison, Option<Logic>),
}

/// A sequence of [Entity]s which themselfes represent another [Sequence] or a [Comparison].
pub type Sequence = Vec<Entity>;