Struct beancount_parser::Cost
source · #[non_exhaustive]pub struct Cost<D> {
pub amount: Option<Amount<D>>,
pub date: Option<Date>,
}
Expand description
Cost of a posting
It is the amount within {
and }
.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.amount: Option<Amount<D>>
Cost basis of the posting
date: Option<Date>
The date of this cost basis
Trait Implementations§
source§impl<D: PartialEq> PartialEq for Cost<D>
impl<D: PartialEq> PartialEq for Cost<D>
impl<D> StructuralPartialEq for Cost<D>
Auto Trait Implementations§
impl<D> Freeze for Cost<D>where
D: Freeze,
impl<D> RefUnwindSafe for Cost<D>where
D: RefUnwindSafe,
impl<D> Send for Cost<D>where
D: Send,
impl<D> Sync for Cost<D>where
D: Sync,
impl<D> Unpin for Cost<D>where
D: Unpin,
impl<D> UnwindSafe for Cost<D>where
D: UnwindSafe,
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