pub struct CsvOutputRow {
pub date: NaiveDate,
pub source: String,
pub currency: String,
pub amount: String,
pub transaction_type: String,
pub payee: String,
pub memo: String,
}
Expand description
A row in the CSV output
Fields§
§date: NaiveDate
The date of the transaction
source: String
The source of the transaction (PayPal, N26, DKB)
currency: String
The currency of the transaction, 3 letters (EUR, USD, …)
amount: String
The amount of the transaction
transaction_type: String
The type of the transaction, read from the original CSV
payee: String
The payee of the transaction
memo: String
The memo or description of the transaction
Implementations§
Source§impl CsvOutputRow
impl CsvOutputRow
Sourcepub fn new(
date: NaiveDate,
source: String,
currency: String,
amount: String,
transaction_type: String,
payee: String,
memo: String,
) -> Self
pub fn new( date: NaiveDate, source: String, currency: String, amount: String, transaction_type: String, payee: String, memo: String, ) -> Self
Create a new CsvOutputRow
Sourcepub fn header() -> StringRecord
pub fn header() -> StringRecord
Create a CSV header
Sourcepub fn to_record(&self) -> StringRecord
pub fn to_record(&self) -> StringRecord
Convert a CsvOutputRow to a CSV record
Trait Implementations§
Source§impl Display for CsvOutputRow
impl Display for CsvOutputRow
Source§impl Ord for CsvOutputRow
impl Ord for CsvOutputRow
Source§impl PartialEq for CsvOutputRow
impl PartialEq for CsvOutputRow
Source§impl PartialOrd for CsvOutputRow
impl PartialOrd for CsvOutputRow
impl Eq for CsvOutputRow
impl StructuralPartialEq for CsvOutputRow
Auto Trait Implementations§
impl Freeze for CsvOutputRow
impl RefUnwindSafe for CsvOutputRow
impl Send for CsvOutputRow
impl Sync for CsvOutputRow
impl Unpin for CsvOutputRow
impl UnwindSafe for CsvOutputRow
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
Source§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more