pub struct ValidationOptions {
pub require_commodities: bool,
pub check_documents: bool,
pub warn_future_dates: bool,
pub document_base: Option<PathBuf>,
pub account_types: Vec<String>,
pub infer_tolerance_from_cost: bool,
pub tolerance_multiplier: Decimal,
pub inferred_tolerance_default: HashMap<String, Decimal>,
}Expand description
Validation options.
Fields§
§require_commodities: boolWhether to require commodity declarations.
check_documents: boolWhether to check if document files exist.
warn_future_dates: boolWhether to warn about future-dated entries.
document_base: Option<PathBuf>Base directory for resolving relative document paths.
account_types: Vec<String>Valid account type prefixes (from options like name_assets, name_liabilities, etc.).
Defaults to ["Assets", "Liabilities", "Equity", "Income", "Expenses"].
infer_tolerance_from_cost: boolWhether to infer tolerance from cost (matches Python beancount’s infer_tolerance_from_cost).
When true, tolerance for cost-based postings is calculated as: units_quantum * cost_per_unit.
tolerance_multiplier: DecimalTolerance multiplier (matches Python beancount’s inferred_tolerance_multiplier).
Default is 0.5.
inferred_tolerance_default: HashMap<String, Decimal>Per-currency default tolerances (matches Python beancount’s inferred_tolerance_default).
e.g., {"GBP": 0.004} means GBP transactions tolerate up to 0.004 residual.
Trait Implementations§
Source§impl Clone for ValidationOptions
impl Clone for ValidationOptions
Source§fn clone(&self) -> ValidationOptions
fn clone(&self) -> ValidationOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ValidationOptions
impl Debug for ValidationOptions
Auto Trait Implementations§
impl Freeze for ValidationOptions
impl RefUnwindSafe for ValidationOptions
impl Send for ValidationOptions
impl Sync for ValidationOptions
impl Unpin for ValidationOptions
impl UnwindSafe for ValidationOptions
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.