pub struct BalanceActual {
pub date: NaiveDate,
pub account: Account,
pub currency: Currency,
pub asserted: Decimal,
pub diff: Decimal,
pub exceeds_tolerance: bool,
}Expand description
The computed result of a balance assertion, recorded during Late
validation (#1663).
diff is computed − asserted in the asserted currency — zero means the
assertion matched exactly. Exposed via ValidationSession::balance_actuals
so the FFI load surface (and any consumer) can render per-assertion
pass/fail without re-deriving the balance from scratch.
Fields§
§date: NaiveDateThe balance directive’s date.
account: AccountThe asserted account.
currency: CurrencyThe asserted currency.
asserted: DecimalThe asserted number, i.e. the balance directive’s own amount.
Recorded so a consumer can tell two assertions apart. (date, account, currency) is NOT unique – a ledger may assert the same account and
currency twice on one date, with different amounts and therefore
different differences (#2180).
diff: Decimalcomputed − asserted in currency (zero = exact match).
exceeds_tolerance: boolWhether diff was outside the assertion’s tolerance, i.e. whether
this assertion FAILED.
Not derivable from diff: a small non-zero difference is a pass when
it falls within the tolerance, explicit or inferred. Recorded from the
same comparison that raises the error, so a consumer never re-derives
the tolerance rule (#2180). #balances.discrepancy reports diff
only where this is true, matching beancount’s diff_amount, which its
checker sets only on a failing entry.
Trait Implementations§
Source§impl Clone for BalanceActual
impl Clone for BalanceActual
Source§fn clone(&self) -> BalanceActual
fn clone(&self) -> BalanceActual
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for BalanceActual
impl RefUnwindSafe for BalanceActual
impl Send for BalanceActual
impl Sync for BalanceActual
impl Unpin for BalanceActual
impl UnsafeUnpin for BalanceActual
impl UnwindSafe for BalanceActual
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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 moreSource§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Source§impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
impl<T, N1, N2> Niching<NichedOption<T, N1>> for N2
Source§unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
unsafe fn is_niched(niched: *const NichedOption<T, N1>) -> bool
Source§fn resolve_niched(out: Place<NichedOption<T, N1>>)
fn resolve_niched(out: Place<NichedOption<T, N1>>)
out indicating that a T is niched.