[][src]Struct edi::Transaction

pub struct Transaction<'a, 'b> {
    pub transaction_code: Cow<'a, str>,
    pub transaction_name: &'b str,
    pub transaction_set_control_number: Cow<'a, str>,
    pub implementation_convention_reference: Option<Cow<'a, str>>,
    pub segments: VecDeque<GenericSegment<'a>>,
}

Represents a transaction in an EDI document. A transaction is initialized with an ST segment and ended with an SE segment.

Fields

transaction_code: Cow<'a, str>

The numeric code which represents the type of transaction.

transaction_name: &'b str

The name of the transaction type in human-readable form.

transaction_set_control_number: Cow<'a, str>

Each transaction within a functional group also has a control number. Typically, trading partners use a number relative to the functional group in which they are contained.

implementation_convention_reference: Option<Cow<'a, str>>

Identifier of the implementation convention reference. Valid value is up to 35 standard characters. Optional.

segments: VecDeque<GenericSegment<'a>>

The GenericSegments contained within this transaction.

Methods

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

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

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

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

Enqueue a GenericSegment into the transaction.

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

Validate this transaction with an SE segment.

Trait Implementations

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

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

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

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

Auto Trait Implementations

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

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

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

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

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

Blanket Implementations

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

impl<T, U> Into<U> for T where
    U: From<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]