Skip to main content

AbsentTarget

Struct AbsentTarget 

Source
pub struct AbsentTarget<'a, E: ConditionEvaluator + ?Sized>(pub &'a E);
Expand description

Evaluates conditions for an element or group that is known to be absent.

Identical to the wrapped evaluator except that the message type’s presence_condition is False: whatever the condition annotates is not there. Use it wherever a status is evaluated to decide whether something missing is required.

Tuple Fields§

§0: &'a E

Trait Implementations§

Source§

impl<E: ConditionEvaluator + ?Sized> ConditionEvaluator for AbsentTarget<'_, E>

Source§

fn evaluate( &self, condition: u32, ctx: &EvaluationContext<'_>, ) -> ConditionResult

Evaluate a single condition by number. Read more
Source§

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

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 more
Source§

fn message_type(&self) -> &str

Returns the message type this evaluator handles (e.g., “UTILMD”).
Source§

fn format_version(&self) -> &str

Returns the format version this evaluator handles (e.g., “FV2510”).

Auto Trait Implementations§

§

impl<'a, E> Freeze for AbsentTarget<'a, E>
where &'a E: Freeze, E: ?Sized,

§

impl<'a, E> RefUnwindSafe for AbsentTarget<'a, E>

§

impl<'a, E> Send for AbsentTarget<'a, E>
where &'a E: Send, E: ?Sized,

§

impl<'a, E> Sync for AbsentTarget<'a, E>
where &'a E: Sync, E: ?Sized,

§

impl<'a, E> Unpin for AbsentTarget<'a, E>
where &'a E: Unpin, E: ?Sized,

§

impl<'a, E> UnsafeUnpin for AbsentTarget<'a, E>
where &'a E: UnsafeUnpin, E: ?Sized,

§

impl<'a, E> UnwindSafe for AbsentTarget<'a, E>
where &'a E: UnwindSafe, E: ?Sized,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.