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
ExternalConditionProviderimplementations. - 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§
- Absent
Target - Evaluates conditions for an element or group that is known to be absent.
- Condition
Expr Evaluator - Evaluates a
ConditionExprAST against an evaluation context. - Evaluation
Context - Context passed to condition evaluators during evaluation.
- Evaluator
Registry - Global registry of condition evaluators.
- Group
Scope - 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. - NoOp
External Provider - A no-op external condition provider that returns
Unknownfor everything. - NoOp
Group Navigator - A no-op group navigator that returns empty results for all queries.
- Present
Target - Evaluates conditions for an element or group that is known to be present, to decide whether it is allowed there.
- Status
Resolution - Which status an AHB status applies, see
ConditionExprEvaluator::resolve_status.
Enums§
- Condition
Result - Three-valued result of evaluating a single condition.
Traits§
- Condition
Evaluator - Evaluates individual AHB conditions by number.
- External
Condition Provider - Provider for external conditions that depend on context outside the EDIFACT message.
- Group
Navigator - Provides group-scoped segment access for condition evaluation.
Functions§
- binds_
once - Whether
statuslimits what it annotates to once per transaction: the conditiononceis 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 asTruewherever there is a transaction, so what it limits — the count — is checked on its own; seebinds_once. - packages_
allow_ none - Whether
expris 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
statusis not allowed wherectxis: aMuss/Xstatus with a condition that evaluates to false throughPresentTarget.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
exprdecides whether something missing must be sent.