[][src]Struct edi::InterchangeControl

pub struct InterchangeControl<'a, 'b> {
    pub authorization_qualifier: Cow<'a, str>,
    pub authorization_information: Cow<'a, str>,
    pub security_qualifier: Cow<'a, str>,
    pub security_information: Cow<'a, str>,
    pub sender_qualifier: Cow<'a, str>,
    pub sender_id: Cow<'a, str>,
    pub receiver_qualifier: Cow<'a, str>,
    pub receiver_id: Cow<'a, str>,
    pub date: Cow<'a, str>,
    pub time: Cow<'a, str>,
    pub standards_id: Cow<'a, str>,
    pub version: Cow<'a, str>,
    pub interchange_control_number: Cow<'a, str>,
    pub acknowledgement_requested: Cow<'a, str>,
    pub test_indicator: Cow<'a, str>,
    pub functional_groups: VecDeque<FunctionalGroup<'a, 'b>>,
}

Represents the ISA/IEA header information commonly known as the "envelope" in X12 EDI.

Fields

authorization_qualifier: Cow<'a, str>

Code to identify the type of information in the Authorization Information.

Qualifiers are two-digit prefixes which categorize the following element.

authorization_information: Cow<'a, str>

Information used for additional identification or authorization of the interchange sender or the data in the interchange; the type of information is set by the Authorization Information Qualifier.

security_qualifier: Cow<'a, str>

Code to identify the type of information in the Security Information

Qualifiers are two-digit prefixes which categorize the following element.

security_information: Cow<'a, str>

This is used for identifying the security information about the interchange sender or the data in the interchange; the type of information is set by the Security Information Qualifier

sender_qualifier: Cow<'a, str>

Qualifier to designate the system/method of code structure used to designate the sender ID.

Qualifiers are two-digit prefixes which categorize the following element.

sender_id: Cow<'a, str>

Identification code published by the sender for other parties to use as the receiver ID to route data to them; the sender always codes this value in the sender ID element

receiver_qualifier: Cow<'a, str>

Qualifier to designate the system/method of code structure used to designate the receiver ID.

Qualifiers are two-digit prefixes which categorize the following element.

receiver_id: Cow<'a, str>

Identification code published by the receiver of the data; When sending, it is used by the sender as their sending ID, thus other parties sending to them will use this as a receiving ID to route data to them

date: Cow<'a, str>

Date of the interchange

time: Cow<'a, str>

Time of the interchange

standards_id: Cow<'a, str>

Code to identify the agency responsible for the control standard used by the message that is enclosed by the interchange header and trailer

version: Cow<'a, str>

Code specifying the version number of the interchange control segments

interchange_control_number: Cow<'a, str>

A control number assigned by the interchange sender

acknowledgement_requested: Cow<'a, str>

Either a 0 or a 1 denoting that acknowledgment is not requested (0) or it is requested (1).

test_indicator: Cow<'a, str>

Code to indicate whether data enclosed by this interchange envelope is test ("T"), production ("P"), or information ("I"

functional_groups: VecDeque<FunctionalGroup<'a, 'b>>

The functional groups contained in this interchange.

Methods

impl<'a, 'b> InterchangeControl<'a, 'b>[src]

pub fn parse_from_tokens(
    input: Vec<&'a str>
) -> Result<InterchangeControl<'a, 'b>, EdiParseError>
[src]

Given [SegmentTokens] (where the first token is "ISA), construct an InterchangeControl.

pub fn add_functional_group(
    &mut self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Enqueue a FunctionalGroup into the interchange. Subsequent [Transaction]s will be inserted into this functional group, until a new one is enqueued.

pub fn add_transaction(
    &mut self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Enqueue a [Transaction] into the most recently enqueued FunctionalGroup in this interchange.

pub fn add_generic_segment(
    &mut self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Enqueue a [GenericSegment] into the most recently enqueued FunctionalGroup's most recently enqueued [Transaction].

pub fn validate_interchange_control(
    &self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Given the tokens of an IEA segment, or Interchange Control closer, verify that the correct number of control groups have been given.

pub fn validate_functional_group(
    &self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Verify the latest FunctionalGroup with a GE segment.

pub fn validate_transaction(
    &self,
    tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
[src]

Verify the latest [Transaction] within the latest FunctionalGroup

Trait Implementations

impl<'a, 'b> PartialEq<InterchangeControl<'a, 'b>> for InterchangeControl<'a, 'b>[src]

impl<'a, 'b> Debug for InterchangeControl<'a, 'b>[src]

impl<'a, 'b> Serialize for InterchangeControl<'a, 'b>[src]

impl<'de: 'a + 'b, 'a, 'b> Deserialize<'de> for InterchangeControl<'a, 'b>[src]

Auto Trait Implementations

impl<'a, 'b> Send for InterchangeControl<'a, 'b>

impl<'a, 'b> Sync for InterchangeControl<'a, 'b>

impl<'a, 'b> Unpin for InterchangeControl<'a, 'b>

impl<'a, 'b> UnwindSafe for InterchangeControl<'a, 'b>

impl<'a, 'b> RefUnwindSafe for InterchangeControl<'a, 'b>

Blanket Implementations

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]