pub struct ReportingEngine { /* private fields */ }Expand description
Reporting engine
Implementations§
Source§impl ReportingEngine
impl ReportingEngine
Sourcepub fn initialize(&mut self) -> Result<(), FinancialError>
pub fn initialize(&mut self) -> Result<(), FinancialError>
No-op returning Ok(()) — the in-memory template store needs no setup.
Sourcepub fn add_report_template(&mut self, template: ReportTemplate)
pub fn add_report_template(&mut self, template: ReportTemplate)
Registers template by template_id (overwrites silently).
Sourcepub fn get_report_template(&self, template_id: &str) -> Option<&ReportTemplate>
pub fn get_report_template(&self, template_id: &str) -> Option<&ReportTemplate>
Registered template for template_id, or None.
Sourcepub fn list_report_templates(&self) -> Vec<String>
pub fn list_report_templates(&self) -> Vec<String>
All registered template IDs.
Sourcepub fn report_generator(&self) -> &ReportGenerator
pub fn report_generator(&self) -> &ReportGenerator
Shared access to report generator.
Sourcepub fn report_generator_mut(&mut self) -> &mut ReportGenerator
pub fn report_generator_mut(&mut self) -> &mut ReportGenerator
Mutable access to report generator.
Sourcepub fn report_distributor(&self) -> &ReportDistributor
pub fn report_distributor(&self) -> &ReportDistributor
Shared access to report distributor.
Sourcepub fn report_distributor_mut(&mut self) -> &mut ReportDistributor
pub fn report_distributor_mut(&mut self) -> &mut ReportDistributor
Mutable access to report distributor.
Sourcepub fn generate_report(
&self,
template_id: &str,
strategy_id: Option<&str>,
data_map: &HashMap<String, Vec<f64>>,
) -> Result<FinancialReport, FinancialError>
pub fn generate_report( &self, template_id: &str, strategy_id: Option<&str>, data_map: &HashMap<String, Vec<f64>>, ) -> Result<FinancialReport, FinancialError>
Generates a concrete FinancialReport by looking up the registered template,
validating the generation strategy (if provided), evaluating all template sections,
aggregating dataset inputs, and packaging the result.
Auto Trait Implementations§
impl Freeze for ReportingEngine
impl RefUnwindSafe for ReportingEngine
impl Send for ReportingEngine
impl Sync for ReportingEngine
impl Unpin for ReportingEngine
impl UnsafeUnpin for ReportingEngine
impl UnwindSafe for ReportingEngine
Blanket Implementations§
§impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
impl<S, A> Aggregate<Result<S, Error>> for Awhere
A: Aggregate<S>,
Aggregate shares in an MPC protocol.
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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 more