Struct okane_core::repl::Transaction
source · pub struct Transaction {
pub date: NaiveDate,
pub effective_date: Option<NaiveDate>,
pub clear_state: ClearState,
pub code: Option<String>,
pub payee: String,
pub posts: Vec<Posting>,
pub metadata: Vec<Metadata>,
}Expand description
Represents a transaction where the money transfered across the accounts.
Fields§
§date: NaiveDateDate when the transaction issued.
effective_date: Option<NaiveDate>Date when the transaction got effective, optional.
clear_state: ClearStateIndiacates clearing state of the entire transaction.
code: Option<String>Transaction code (not necessarily unique).
payee: StringLabel of the transaction, often the opposite party of the transaction.
posts: Vec<Posting>Postings of the transaction, could be empty.
metadata: Vec<Metadata>Transaction level metadata.
Implementations§
source§impl Transaction
impl Transaction
sourcepub fn new(date: NaiveDate, payee: String) -> Transaction
pub fn new(date: NaiveDate, payee: String) -> Transaction
Constructs minimal transaction.
Trait Implementations§
source§impl Debug for Transaction
impl Debug for Transaction
source§impl From<Transaction> for Transaction
impl From<Transaction> for Transaction
source§fn from(orig: Transaction) -> Transaction
fn from(orig: Transaction) -> Transaction
Converts to this type from the input type.
source§impl PartialEq for Transaction
impl PartialEq for Transaction
source§fn eq(&self, other: &Transaction) -> bool
fn eq(&self, other: &Transaction) -> bool
This method tests for
self and other values to be equal, and is used
by ==.impl Eq for Transaction
impl StructuralPartialEq for Transaction
Auto Trait Implementations§
impl RefUnwindSafe for Transaction
impl Send for Transaction
impl Sync for Transaction
impl Unpin for Transaction
impl UnwindSafe for Transaction
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