pub struct PcnExporter;Expand description
PCN Exporter - Generates PDF and Excel reports
Implementations§
Source§impl PcnExporter
impl PcnExporter
Sourcepub fn export_to_pdf(
building_name: &str,
report_lines: &[PcnReportLine],
total_amount: Decimal,
) -> Result<Vec<u8>, String>
pub fn export_to_pdf( building_name: &str, report_lines: &[PcnReportLine], total_amount: Decimal, ) -> Result<Vec<u8>, String>
Export PCN report to PDF bytes
Returns PDF document as Vec<u8>
Sourcepub fn export_to_excel(
building_name: &str,
report_lines: &[PcnReportLine],
total_amount: Decimal,
) -> Result<Vec<u8>, String>
pub fn export_to_excel( building_name: &str, report_lines: &[PcnReportLine], total_amount: Decimal, ) -> Result<Vec<u8>, String>
Export PCN report to Excel bytes
Returns Excel workbook as Vec<u8>
Auto Trait Implementations§
impl Freeze for PcnExporter
impl RefUnwindSafe for PcnExporter
impl Send for PcnExporter
impl Sync for PcnExporter
impl Unpin for PcnExporter
impl UnsafeUnpin for PcnExporter
impl UnwindSafe for PcnExporter
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
§impl<T> Fake for T
impl<T> Fake for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.