pub struct AccountingModuleBuilder { /* private fields */ }Expand description
Builder for AccountingModule
Implementations§
Source§impl AccountingModuleBuilder
impl AccountingModuleBuilder
Sourcepub fn with_chart_dataset(self, dataset: Arc<ChartDataset>) -> Self
pub fn with_chart_dataset(self, dataset: Arc<ChartDataset>) -> Self
Register a chart-of-accounts dataset installable through the chart install
engine. Datasets are data (commonly shipped by an l10n module); registering
one makes it listable via GET /accounting/charts and installable by the
host-mounted install verb.
Sourcepub fn with_deferred_tax(self, port: Arc<dyn DeferredTaxLookup>) -> Self
pub fn with_deferred_tax(self, port: Arc<dyn DeferredTaxLookup>) -> Self
Wire the host’s cash-basis tax deferral lookup: partial reconciliations landing on receivable/payable lines flip deferred (on_payment) tax pro-rata from the transition account onto the real tax account. Hosts without a tax module leave it unset — no flips, everything else works.
Sourcepub fn with_budget_control(self, port: Arc<dyn BudgetControlPort>) -> Self
pub fn with_budget_control(self, port: Arc<dyn BudgetControlPort>) -> Self
Wire the host’s budget control: postings through the GL-posting chokepoint are checked against confirmed budget positions (account x cost center x fiscal period) after the pure double-entry rules pass. Warn-enforcement breaches log and proceed; block-enforcement breaches refuse the posting. Hosts without a budget module leave it unset — no check, everything else works (fail-open).
Source§impl AccountingModuleBuilder
impl AccountingModuleBuilder
Sourcepub fn with_database(self, pool: PgPool) -> Self
pub fn with_database(self, pool: PgPool) -> Self
Set the database connection pool
Sourcepub fn build(self) -> Result<AccountingModule>
pub fn build(self) -> Result<AccountingModule>
Build the module with configured dependencies
Trait Implementations§
Source§impl Default for AccountingModuleBuilder
impl Default for AccountingModuleBuilder
Source§impl Deref for AccountingModuleBuilder
impl Deref for AccountingModuleBuilder
Auto Trait Implementations§
impl !RefUnwindSafe for AccountingModuleBuilder
impl !UnwindSafe for AccountingModuleBuilder
impl Freeze for AccountingModuleBuilder
impl Send for AccountingModuleBuilder
impl Sync for AccountingModuleBuilder
impl Unpin for AccountingModuleBuilder
impl UnsafeUnpin for AccountingModuleBuilder
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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 more