#[non_exhaustive]pub enum Syntax {
Ubl,
Cii,
}Expand description
The syntax of an e-invoice, as its root element names it.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Ubl
OASIS UBL 2: a root element Invoice or CreditNote in the UBL 2 namespace of
that name.
Cii
UN/CEFACT Cross Industry Invoice: a root element CrossIndustryInvoice in the
namespace urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100.
Implementations§
Source§impl Syntax
impl Syntax
Sourcepub fn detect(document: &[u8]) -> Option<Self>
pub fn detect(document: &[u8]) -> Option<Self>
The syntax of document, from its root element alone: its local name and
namespace. None when the document does not start like XML with one of the root
elements above (another root element, a document that is not XML, a document type
declaration before the root, an encoding other than UTF-8). Only the start of the
document is read; whether it is well-formed is for the validation to say.
Sourcepub const fn builtin_rule_set(self) -> &'static str
pub const fn builtin_rule_set(self) -> &'static str
The name of the built-in rule set of this syntax: cen-ubl or cen-cii, the CEN
EN 16931 rules (whether this build has it is in
BUILTIN_RULE_SETS).