[−][src]Struct edi::Transaction
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]
input: Vec<&'a str>
) -> Result<Transaction<'a, 'b>, EdiParseError>
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]
&self,
tokens: Vec<&'a str>
) -> Result<(), EdiParseError>
Validate this transaction with an SE segment.
Trait Implementations
impl<'a, 'b> PartialEq<Transaction<'a, 'b>> for Transaction<'a, 'b>
[src]
fn eq(&self, other: &Transaction<'a, 'b>) -> bool
[src]
fn ne(&self, other: &Transaction<'a, 'b>) -> bool
[src]
impl<'a, 'b> Debug for Transaction<'a, 'b>
[src]
impl<'a, 'b> Serialize for Transaction<'a, 'b>
[src]
fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error> where
__S: Serializer,
[src]
__S: Serializer,
impl<'de: 'a + 'b, 'a, 'b> Deserialize<'de> for Transaction<'a, 'b>
[src]
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
[src]
__D: Deserializer<'de>,
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]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> DeserializeOwned for T where
T: Deserialize<'de>,
[src]
T: Deserialize<'de>,