#[non_exhaustive]pub enum IcmsVariant {
Cst(Box<IcmsCst>),
Csosn(Box<IcmsCsosn>),
}Expand description
Unified ICMS variant wrapping both normal-regime CSTs and Simples Nacional
CSOSNs. Pass one of these to build_icms_xml for compile-time-safe XML
generation.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Cst(Box<IcmsCst>)
Normal tax regime (Lucro Real / Presumido).
Csosn(Box<IcmsCsosn>)
Simples Nacional tax regime (CRT 1/2).
Trait Implementations§
Source§impl Clone for IcmsVariant
impl Clone for IcmsVariant
Source§fn clone(&self) -> IcmsVariant
fn clone(&self) -> IcmsVariant
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IcmsVariant
impl Debug for IcmsVariant
Source§impl From<IcmsCsosn> for IcmsVariant
impl From<IcmsCsosn> for IcmsVariant
Source§impl From<IcmsCst> for IcmsVariant
impl From<IcmsCst> for IcmsVariant
Source§impl TaxCalculation for IcmsVariant
impl TaxCalculation for IcmsVariant
Source§fn build_xml(&self) -> String
fn build_xml(&self) -> String
Build the ICMS XML string, delegating to build_icms_xml.
A throwaway crate::tax_icms::IcmsTotals accumulator is used since
the trait cannot surface totals side-effects. Returns an empty string
if the underlying call returns an error.
Auto Trait Implementations§
impl Freeze for IcmsVariant
impl RefUnwindSafe for IcmsVariant
impl Send for IcmsVariant
impl Sync for IcmsVariant
impl Unpin for IcmsVariant
impl UnsafeUnpin for IcmsVariant
impl UnwindSafe for IcmsVariant
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
Mutably borrows from an owned value. Read more