pub struct TaxRuleSchema {
pub jurisdiction_id: String,
pub description: String,
pub rules: Vec<TaxRule>,
}Expand description
Defines modular tax and jurisdictional rulesets to be loaded into the Webizen VM. These rules are applied to the immutable Quins to compute dynamic, mutable tax liabilities without polluting the underlying graph.
Fields§
§jurisdiction_id: String§description: String§rules: Vec<TaxRule>Implementations§
Source§impl TaxRuleSchema
impl TaxRuleSchema
Sourcepub fn new_au_gst() -> Self
pub fn new_au_gst() -> Self
Mock AU GST schema (10% GST on income, 10% credit on expenses)
Sourcepub fn new_eu_vat() -> Self
pub fn new_eu_vat() -> Self
EU VAT (standard 20%): 20% owed on income, 20% creditable on expenses.
Sourcepub fn new_us_sales_tax() -> Self
pub fn new_us_sales_tax() -> Self
US combined sales tax (illustrative ~7% on sales; expenses are not creditable).
Sourcepub fn new_zero_rated() -> Self
pub fn new_zero_rated() -> Self
Zero-rated / exempt jurisdiction — no liability on any category.
Auto Trait Implementations§
impl Freeze for TaxRuleSchema
impl RefUnwindSafe for TaxRuleSchema
impl Send for TaxRuleSchema
impl Sync for TaxRuleSchema
impl Unpin for TaxRuleSchema
impl UnsafeUnpin for TaxRuleSchema
impl UnwindSafe for TaxRuleSchema
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
Converts
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>
Converts
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