Skip to main content

FetchedRuleSet

Struct FetchedRuleSet 

Source
pub struct FetchedRuleSet { /* private fields */ }
Expand description

A rule set this crate fetches from its publisher on demand (RuleSetCache): its files are not redistributed by the project. Each is one bundle of a family; the rule sets of a family come from the same downloads and are fetched together.

Implementations§

Source§

impl FetchedRuleSet

Source

pub const fn name(&self) -> &'static str

Its name, as --rules and Validator::from_cache take it, and as its manifest gives it (factur-x-en16931).

Source

pub const fn title(&self) -> &'static str

Its title (Factur-X EN16931).

Source

pub fn version(&self) -> &str

The version of the official artefacts (1.09.2).

Source

pub const fn family(&self) -> &'static str

The name of its family (factur-x, xrechnung, fr-ctc, peppol), which RuleSetCache::fetch (feature fetch) also takes.

Source

pub const fn family_title(&self) -> &'static str

The title of its family (Factur-X).

Source

pub fn publisher(&self) -> &str

Where its files come from.

Source

pub fn sources(&self) -> &[Source]

The files fetched for its family, with their pinned URLs and digests.

Source

pub const fn syntax(&self) -> Option<Syntax>

The syntax of the documents it validates, when it is UBL or CII.

Source

pub fn bundle_path(&self) -> String

The directory of its bundle, relative to the cache’s rule-set directory: <release>/<bundle> (factur-x-1.09.2/en16931), as the fetch script of its family lays it out under its output directory.

Source

pub fn manifest(&self) -> &str

The manifest of its bundle (bundle.toml), as the fetch script writes it.

Trait Implementations§

Source§

impl Debug for FetchedRuleSet

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.