Skip to main content

Crate fiscal

Crate fiscal 

Source
Expand description

Facade crate that re-exports all fiscal-rs sub-crates under a single fiscal namespace.

All items from fiscal_core, fiscal_crypto (under certificate), and fiscal_sefaz (under sefaz) are available from this crate so that existing use fiscal::... imports continue to work unchanged.

Modules§

certificate
Certificate handling and XML signing.
complement
Functions for attaching SEFAZ authorization protocols to signed XML documents. Functions for attaching SEFAZ authorization protocols to signed XML documents.
config
Configuration validation for Brazilian fiscal documents.
constants
Compile-time constants: namespaces, algorithm URIs, and payment type codes. Compile-time constants used throughout NF-e XML generation.
contingency
Contingency mode manager for NF-e fallback emission.
convert
SPED TXT-to-XML converter for NF-e documents. TXT-to-XML converter for NF-e/NFC-e.
error
Error types for all fiscal operations.
format_utils
Formatting helpers for monetary amounts, rates, and decimal numbers. Formatting helpers for monetary amounts, rates, and decimal numbers.
gtin
GTIN (barcode) validation and check-digit calculation.
newtypes
Parse-don’t-validate newtypes for monetary amounts, tax rates, access keys, and state codes. Parse-don’t-validate newtypes for monetary amounts, tax rates, access keys, and state codes.
qrcode
NFC-e QR code URL builder and XML injection.
sanitize
ASCII sanitization for XML text content (replaces accented characters). ASCII sanitization for XML text content.
sealed
Sealed trait infrastructure for preventing external implementations. Sealed trait infrastructure.
sefaz
SEFAZ URLs, request builders, response parsers, and status codes.
standardize
NF-e XML document type identification and XML-to-JSON conversion.
state_codes
Brazilian state IBGE code lookup tables and helpers. Brazilian state IBGE code lookup tables and helper functions.
status_codes
SEFAZ status code constants and valid-status sets. SEFAZ status code constants (cStat) and valid-status sets.
tax_element
Internal tax element types used by tax computation modules. Internal building blocks for tax XML element serialisation.
tax_ibs_cbs
IBS/CBS (Imposto sobre Bens e Servicos / Contribuicao sobre Bens e Servicos) XML generation. IBS/CBS (Imposto sobre Bens e Servicos / Contribuicao sobre Bens e Servicos) XML generation for NF-e items – PL_010 tax reform.
tax_icms
ICMS tax computation and XML generation (CST and CSOSN variants). ICMS tax computation and XML generation for NF-e / NFC-e documents.
tax_is
IS (Imposto Seletivo) XML generation. IS (Imposto Seletivo) XML generation for NF-e items — PL_010 tax reform.
tax_issqn
ISSQN (municipal service tax) XML generation. ISSQN (ISS — Imposto Sobre Serviços) XML generation for NF-e service items.
tax_pis_cofins_ipi
PIS, COFINS, IPI, and II tax computation and XML generation. PIS, COFINS, IPI, and II (import tax) XML generation for NF-e items.
timezone
Timezone lookup by Brazilian state (UF). Timezone lookup by Brazilian state (UF).
traits
Sealed public traits: TaxCalculation and XmlSerializable. Sealed public traits for tax calculation and XML serialization.
types
Public data structures for NF-e / NFC-e documents. Public data structures for NF-e / NFC-e documents.
xml_builder
Typestate XML builder for NF-e / NFC-e documents. NF-e/NFC-e XML builder module.
xml_utils
XML building primitives: tag, escape_xml, and extract_xml_tag_value. Low-level XML building primitives used throughout the crate.

Enums§

FiscalError
The primary error type returned by all public functions in fiscal-core, fiscal-crypto, and fiscal-sefaz.