pub struct PresentTarget<'a, E: ConditionEvaluator + ?Sized>(pub &'a E);Expand description
Evaluates conditions for an element or group that is known to be present, to decide whether it is allowed there.
The message type’s presence_conditions are True: whatever the
condition annotates is there. Only the AHB’s conditions proper ([1] to
[499]) decide; notes ([500]–[899]), formats ([900]–[999]) and
repetition rules ([2000] and up: “genau einmal je SG8 …”) say nothing about
whether something may be sent, and are Unknown — so [197] ∧ [2308] is
false when [197] is, and [2317] ⊻ [2318] is never.
Tuple Fields§
§0: &'a ETrait Implementations§
Source§impl<E: ConditionEvaluator + ?Sized> ConditionEvaluator for PresentTarget<'_, E>
impl<E: ConditionEvaluator + ?Sized> ConditionEvaluator for PresentTarget<'_, E>
Source§fn evaluate(
&self,
condition: u32,
ctx: &EvaluationContext<'_>,
) -> ConditionResult
fn evaluate( &self, condition: u32, ctx: &EvaluationContext<'_>, ) -> ConditionResult
Evaluate a single condition by number. Read more
Source§fn is_external(&self, condition: u32) -> bool
fn is_external(&self, condition: u32) -> bool
Returns
true if the given condition requires external context
(i.e., cannot be determined from the EDIFACT message alone).Source§fn is_known(&self, condition: u32) -> bool
fn is_known(&self, condition: u32) -> bool
Returns
true if this evaluator has an implementation for the given
condition number (whether internal or external). Conditions that fall
through to the _ => Unknown wildcard return false. Read moreSource§fn message_type(&self) -> &str
fn message_type(&self) -> &str
Returns the message type this evaluator handles (e.g., “UTILMD”).
Source§fn format_version(&self) -> &str
fn format_version(&self) -> &str
Returns the format version this evaluator handles (e.g., “FV2510”).
Auto Trait Implementations§
impl<'a, E> Freeze for PresentTarget<'a, E>
impl<'a, E> RefUnwindSafe for PresentTarget<'a, E>
impl<'a, E> Send for PresentTarget<'a, E>
impl<'a, E> Sync for PresentTarget<'a, E>
impl<'a, E> Unpin for PresentTarget<'a, E>
impl<'a, E> UnsafeUnpin for PresentTarget<'a, E>
impl<'a, E> UnwindSafe for PresentTarget<'a, E>
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