pub struct NormalizedTransaction { /* private fields */ }Expand description
A normalized transaction detail value.
Implementations§
Source§impl NormalizedTransaction
impl NormalizedTransaction
Sourcepub fn from_detail(detail: &TransactionDetailRecord) -> Result<Self, Bai2Error>
pub fn from_detail(detail: &TransactionDetailRecord) -> Result<Self, Bai2Error>
Normalizes a BAI2 transaction detail record.
§Errors
Returns Bai2Error::UnknownTransactionDirection when the raw type code cannot be mapped
into a conservative inflow or outflow direction.
Sourcepub const fn transaction_type(&self) -> &TransactionTypeCode
pub const fn transaction_type(&self) -> &TransactionTypeCode
Returns the raw transaction type code.
Sourcepub const fn direction(&self) -> TransactionDirection
pub const fn direction(&self) -> TransactionDirection
Returns the normalized direction.
Sourcepub fn bank_reference(&self) -> Option<&str>
pub fn bank_reference(&self) -> Option<&str>
Returns the optional bank reference.
Sourcepub fn customer_reference(&self) -> Option<&str>
pub fn customer_reference(&self) -> Option<&str>
Returns the optional customer reference.
Trait Implementations§
Source§impl Clone for NormalizedTransaction
impl Clone for NormalizedTransaction
Source§fn clone(&self) -> NormalizedTransaction
fn clone(&self) -> NormalizedTransaction
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 NormalizedTransaction
impl Debug for NormalizedTransaction
impl Eq for NormalizedTransaction
Source§impl PartialEq for NormalizedTransaction
impl PartialEq for NormalizedTransaction
Source§fn eq(&self, other: &NormalizedTransaction) -> bool
fn eq(&self, other: &NormalizedTransaction) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for NormalizedTransaction
Auto Trait Implementations§
impl Freeze for NormalizedTransaction
impl RefUnwindSafe for NormalizedTransaction
impl Send for NormalizedTransaction
impl Sync for NormalizedTransaction
impl Unpin for NormalizedTransaction
impl UnsafeUnpin for NormalizedTransaction
impl UnwindSafe for NormalizedTransaction
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