pub enum Cardinality {
Mandatory,
Required,
Dependent,
Optional,
NotUsed,
Conditional,
}Expand description
Cardinality of a segment or group in the MIG.
Variants§
Mandatory
Mandatory (M) — must appear exactly once or as specified.
Required
Required (R) — must appear.
Dependent
Dependent (D) — depends on other segments.
Optional
Optional (O) — may appear.
NotUsed
Not used (N) — must not appear.
Conditional
Conditional (C) — conditional on context.
Implementations§
Source§impl Cardinality
impl Cardinality
Sourcepub fn from_status(status: &str) -> Self
pub fn from_status(status: &str) -> Self
Parse from a status string (e.g., “M”, “C”, “R”, “D”, “O”, “N”).
Sourcepub fn is_required(&self) -> bool
pub fn is_required(&self) -> bool
Whether this cardinality means the element is required.
Trait Implementations§
Source§impl Clone for Cardinality
impl Clone for Cardinality
Source§fn clone(&self) -> Cardinality
fn clone(&self) -> Cardinality
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Cardinality
impl Debug for Cardinality
Source§impl<'de> Deserialize<'de> for Cardinality
impl<'de> Deserialize<'de> for Cardinality
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for Cardinality
impl PartialEq for Cardinality
Source§impl Serialize for Cardinality
impl Serialize for Cardinality
impl Eq for Cardinality
impl StructuralPartialEq for Cardinality
Auto Trait Implementations§
impl Freeze for Cardinality
impl RefUnwindSafe for Cardinality
impl Send for Cardinality
impl Sync for Cardinality
impl Unpin for Cardinality
impl UnsafeUnpin for Cardinality
impl UnwindSafe for Cardinality
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