[][src]Struct edi::FunctionalGroup

pub struct FunctionalGroup<'a, 'b> {
    pub functional_identifier_code: Cow<'a, str>,
    pub application_sender_code: Cow<'a, str>,
    pub application_receiver_code: Cow<'a, str>,
    pub date: Cow<'a, str>,
    pub time: Cow<'a, str>,
    pub group_control_number: Cow<'a, str>,
    pub responsible_agency_code: Cow<'a, str>,
    pub version: Cow<'a, str>,
    pub transactions: VecDeque<Transaction<'a, 'b>>,
}

Represents a GS/GE segment which wraps a functional group. Documentation here gleaned mostly from here

Fields

functional_identifier_code: Cow<'a, str>

Identifies the function of this group. See http://ecomgx17.ecomtoday.com/edi/EDI_4010/el479.htm for a list of functional identifier codes.

application_sender_code: Cow<'a, str>

Identifies the sender of this group.

application_receiver_code: Cow<'a, str>

Identifies the receiver of this group.

date: Cow<'a, str>

Identifies the date of the function performed.

time: Cow<'a, str>

Identifies the time of the function performed. Expressed in 24-hour clock time as follows: HHMM, or HHMMSS, or HHMMSSD, or HHMMSSDD, where H = hours (00-23), M = minutes (00-59), S = integer seconds (00-59) and DD = decimal seconds; decimal seconds are expressed as follows: D = tenths (0-9) and DD = hundredths (00-99)

group_control_number: Cow<'a, str>

An ID code for this specific control group. Should be the same in the GE (group end) segment.

responsible_agency_code: Cow<'a, str>

Code identifying the issuer of the standard

version: Cow<'a, str>

Code indicating the version, release, subrelease, and industry identifier of the EDI standard being used, including the GS and GE segments; If code DE455 in GS segment is X, then in DE 480 positions 1-3 are the version number; positions 4-6 are the release and subrelease, level of the version; and positions 7-12 are the industry or trade association identifiers (optionally assigned by user); if code in DE455 in GS segment is T, then other formats are allowed

transactions: VecDeque<Transaction<'a, 'b>>

The transactions that this functional group contains.

Methods

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

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

Given [SegmentTokens] (where the first token is "GS"), construct a FunctionalGroup.

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

Enqueue a Transaction into the group. Subsequent segments will be enqueued into this transaction.

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

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

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

Verify this FunctionalGroup with a GE segment.

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

Validate the latest Transaction within this functional group with an SE segment.

Trait Implementations

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

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

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

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

Auto Trait Implementations

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

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

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

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

impl<'a, 'b> RefUnwindSafe for FunctionalGroup<'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]