pub enum Phase {
Early,
Late,
}Expand description
Which phase of two-phase validation to run.
The loader pipeline splits validation around booking. Checks that
don’t need filled-in amounts (account presence, account lifecycle,
structural integrity, date ordering, document presence, commodity
metadata) run as Phase::Early AFTER synthesizer plugins
(auto_accounts, document_discovery) but BEFORE booking, so
they see elided postings to unopened accounts (with any Opens
plugins injected) before booking drops zero-value interpolations.
Checks that need filled-in amounts (currency constraints, balance
residuals, inventory updates, balance assertions) run as
Phase::Late AFTER booking AND after the regular plugin pass
(so cost-spec-reading plugins like implicit_prices see filled
per-unit values on the CostNumber::PerUnitFromTotal variant).
The pipeline is therefore: sort → synth-plugins → Early → book → regular-plugins → Late → finalize
Standalone callers (LSP, tests, FFI) that don’t run booking between
phases typically chain Early → Late → ValidationSession::finalize
through a single session — there is no shortcut entry point anymore.
See the “Python Compatibility Policy” section in CLAUDE.md for the
rationale on why we deliberately catch elided-zero-to-unopened-account
references that Python beancount silently accepts.
Variants§
Early
Pre-booking checks: account presence (E1001), account lifecycle, structural integrity, date ordering, future-date warnings, document presence, commodity metadata.
Late
Post-booking checks: currency constraints on filled postings, transaction balance, balance assertions, inventory updates with lot matching / capital gains, residual checks.
Trait Implementations§
impl Copy for Phase
impl Eq for Phase
impl StructuralPartialEq for Phase
Auto Trait Implementations§
impl Freeze for Phase
impl RefUnwindSafe for Phase
impl Send for Phase
impl Sync for Phase
impl Unpin for Phase
impl UnsafeUnpin for Phase
impl UnwindSafe for Phase
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<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<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.