pub struct ProcessingLagCalculator { /* private fields */ }Expand description
Calculator for processing lags.
Implementations§
Source§impl ProcessingLagCalculator
impl ProcessingLagCalculator
Sourcepub fn with_config(seed: u64, config: ProcessingLagConfig) -> Self
pub fn with_config(seed: u64, config: ProcessingLagConfig) -> Self
Create with custom configuration.
Sourcepub fn calculate_posting_time(
&mut self,
event_type: EventType,
event_datetime: NaiveDateTime,
) -> NaiveDateTime
pub fn calculate_posting_time( &mut self, event_type: EventType, event_datetime: NaiveDateTime, ) -> NaiveDateTime
Calculate the posting time for an event.
Takes the event datetime and returns the datetime when it would be posted to the accounting system.
Sourcepub fn should_post_next_day(&mut self, hour: u8) -> bool
pub fn should_post_next_day(&mut self, hour: u8) -> bool
Determine if an event should be posted the next day based on its hour.
Sourcepub fn calculate_posting_date(
&mut self,
event_type: EventType,
event_date: NaiveDate,
event_hour: u8,
) -> NaiveDate
pub fn calculate_posting_date( &mut self, event_type: EventType, event_date: NaiveDate, event_hour: u8, ) -> NaiveDate
Calculate posting date (ignoring time).
Sourcepub fn config(&self) -> &ProcessingLagConfig
pub fn config(&self) -> &ProcessingLagConfig
Get the configuration.
Auto Trait Implementations§
impl Freeze for ProcessingLagCalculator
impl RefUnwindSafe for ProcessingLagCalculator
impl Send for ProcessingLagCalculator
impl Sync for ProcessingLagCalculator
impl Unpin for ProcessingLagCalculator
impl UnwindSafe for ProcessingLagCalculator
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