pub struct Tag(/* private fields */);Expand description
Transaction tag
§Example
let input = r#"
2022-05-22 * "Grocery store" "Grocery shopping" #food
Assets:Cash -10 CHF
Expenses:Groceries
"#;
let beancount: BeancountFile<f64> = input.parse().unwrap();
let DirectiveContent::Transaction(trx) = &beancount.directives[0].content else {
unreachable!("was not a transaction")
};
assert!(trx.tags.contains("food"));Implementations§
Trait Implementations§
impl Eq for Tag
Source§impl Ord for Tag
impl Ord for Tag
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialOrd for Tag
impl PartialOrd for Tag
impl StructuralPartialEq for Tag
Auto Trait Implementations§
impl Freeze for Tag
impl RefUnwindSafe for Tag
impl Send for Tag
impl Sync for Tag
impl Unpin for Tag
impl UnsafeUnpin for Tag
impl UnwindSafe for Tag
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