Skip to main content

Module eval

Module eval 

Source
Expand description

Condition evaluation traits and expression evaluator.

Re-exports§

pub use answer_lists::AnswerCodeLists;
pub use codelist::ArtikelIdCodelist;
pub use codelist::CodelistColumn;
pub use codelist::MessageFlags;
pub use ebd_cluster::Cluster;
pub use ebd_cluster::EbdClusterLookup;
pub use providers::CodeListProvider;
pub use providers::CompositeExternalProvider;
pub use providers::CountryPostalCodeProvider;
pub use providers::KonfigurationenProvider;
pub use providers::MapExternalProvider;
pub use providers::MarketRole;
pub use providers::MarketRoleProvider;
pub use providers::Sector;
pub use providers::SectorProvider;
pub use timezone::dst_transitions_between;
pub use timezone::is_mesz_utc;
pub use timezone::is_mez_utc;
pub use timezone::parse_dtm303;
pub use werktag::compute_easter;
pub use werktag::is_german_holiday;
pub use werktag::is_werktag;
pub use werktag::parse_ccyymmdd_prefix;
pub use werktag::werktage_between;
pub use format_validators::*;

Modules§

answer_lists
Which answer codes each EBD / Codeliste holds.
codelist
BDEW Artikel-ID / Artikelnummer codelist provider.
ebd_cluster
EBD answer-code cluster lookup.
format_validators
Format validation helpers for AHB 900-series conditions.
providers
Concrete ExternalConditionProvider implementations.
sg4_instances
Group instances of one UTILMD SG4 compared with each other.
timezone
DST timezone helpers for German MESZ/MEZ validation.
werktag
German Werktag (working day) arithmetic for BDEW AHB conditions.

Structs§

AbsentTarget
Evaluates conditions for an element or group that is known to be absent.
ConditionExprEvaluator
Evaluates a ConditionExpr AST against an evaluation context.
EvaluationContext
Context passed to condition evaluators during evaluation.
EvaluatorRegistry
Global registry of condition evaluators.
GroupScope
A scope identifying one group instance, by its repetition at every level from the root: [("SG4", 1), ("SG8", 2)] is the third SG8 of the second SG4.
NoOpExternalProvider
A no-op external condition provider that returns Unknown for everything.
NoOpGroupNavigator
A no-op group navigator that returns empty results for all queries.
PresentTarget
Evaluates conditions for an element or group that is known to be present, to decide whether it is allowed there.
StatusResolution
Which status an AHB status applies, see ConditionExprEvaluator::resolve_status.

Enums§

ConditionResult
Three-valued result of evaluating a single condition.

Traits§

ConditionEvaluator
Evaluates individual AHB conditions by number.
ExternalConditionProvider
Provider for external conditions that depend on context outside the EDIFACT message.
GroupNavigator
Provides group-scoped segment access for condition evaluation.

Functions§

binds_once
Whether status limits what it annotates to once per transaction: the condition once is a conjunct of every line (Muss [483] ∧ [2061]). Where it sits in one branch only (Soll [165] ∧ (([2061] ∧ [583]) ∨ [584])), the other branch allows more.
once_per_transaction
The condition of a message type that allows a group or segment once per transaction, and the transaction group: UTILMD’s [2061] “Segment bzw. Segmentgruppe ist genau einmal je SG4 IDE (Vorgang) anzugeben” (Strom and Gas, FV2504–FV2610). The conditions evaluate it as True wherever there is a transaction, so what it limits — the count — is checked on its own; see binds_once.
packages_allow_none
Whether expr is package terms only, none of which needs a code ([9P0..1]): a status of that kind requires nothing.
presence_condition
The number of a message type’s bare “Wenn vorhanden” condition, if it has one.
presence_conditions
Every condition of a message type that answers “does the annotated thing exist?”, which an absent element or group answers with no.
refuses_presence
Whether something present under status is not allowed where ctx is: a Muss/X status with a condition that evaluates to false through PresentTarget. Soll/Kann, an unconditional status, an undecidable condition, a package ([19P1..1], judged by its own check) and a status of several lines refuse nothing.
requiredness
What of expr decides whether something missing must be sent.