Struct beancount_parser::Link
source · pub struct Link(/* private fields */);Expand description
Transaction link
Example
let input = r#"
2014-02-05 * "Invoice for January" ^invoice-pepe-studios-jan14
Income:Clients:PepeStudios -8450.00 USD
Assets:AccountsReceivable
"#;
let beancount: BeancountFile<f64> = input.parse().unwrap();
let DirectiveContent::Transaction(trx) = &beancount.directives[0].content else {
unreachable!("was not a transaction")
};
assert!(trx.links.contains("invoice-pepe-studios-jan14"));Implementations§
Trait Implementations§
source§impl Ord for Link
impl Ord for Link
source§impl PartialEq for Link
impl PartialEq for Link
source§impl PartialOrd for Link
impl PartialOrd for Link
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self and other) and is used by the <=
operator. Read moreimpl Eq for Link
impl StructuralEq for Link
impl StructuralPartialEq for Link
Auto Trait Implementations§
impl RefUnwindSafe for Link
impl Send for Link
impl Sync for Link
impl Unpin for Link
impl UnwindSafe for Link
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