pub struct Eric;
Expand description
A structure to manage the Eric instance from the shared C library.
Use Eric::new
to initialize Eric. Closes Eric when dropped.
Implementations§
Source§impl Eric
impl Eric
Sourcepub fn new(log_path: &Path) -> Result<Self, Error>
pub fn new(log_path: &Path) -> Result<Self, Error>
Initializes a single-threaded Eric instance.
Sourcepub fn validate(
&self,
xml: String,
taxonomy_type: &str,
taxonomy_version: &str,
pdf_path: Option<&str>,
) -> Result<EricResponse, Error>
pub fn validate( &self, xml: String, taxonomy_type: &str, taxonomy_version: &str, pdf_path: Option<&str>, ) -> Result<EricResponse, Error>
Validates an XML file for a specific taxonomy.
Optionally, a confirmation is printed to pdf_path
.
Sourcepub fn send(
&self,
xml: String,
taxonomy_type: &str,
taxonomy_version: &str,
pdf_path: Option<&str>,
) -> Result<EricResponse, Error>
pub fn send( &self, xml: String, taxonomy_type: &str, taxonomy_version: &str, pdf_path: Option<&str>, ) -> Result<EricResponse, Error>
Sends an XML file for a specific taxonomy to the tax authorities.
The Elster certificate is provided via environment variables
CERTIFICATE_PATH
and CERTIFICATE_PASSWORD
.
Optionally, a confirmation is printed to pdf_path
.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Eric
impl RefUnwindSafe for Eric
impl Send for Eric
impl Sync for Eric
impl Unpin for Eric
impl UnwindSafe for Eric
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