pub struct IntraDayPatterns {
pub enabled: bool,
pub segments: Vec<IntraDaySegment>,
}Expand description
Configuration for intra-day posting patterns.
Defines segments of the business day with different activity multipliers, allowing for realistic modeling of morning spikes, lunch dips, and end-of-day rushes.
Fields§
§enabled: boolWhether intra-day patterns are enabled.
segments: Vec<IntraDaySegment>Time segments with activity multipliers.
Implementations§
Source§impl IntraDayPatterns
impl IntraDayPatterns
Sourcepub fn with_segments(segments: Vec<IntraDaySegment>) -> Self
pub fn with_segments(segments: Vec<IntraDaySegment>) -> Self
Creates patterns with custom segments.
Sourcepub fn get_multiplier(&self, time: NaiveTime, is_human: bool) -> f64
pub fn get_multiplier(&self, time: NaiveTime, is_human: bool) -> f64
Gets the multiplier for a given time based on posting type.
Trait Implementations§
Source§impl Clone for IntraDayPatterns
impl Clone for IntraDayPatterns
Source§fn clone(&self) -> IntraDayPatterns
fn clone(&self) -> IntraDayPatterns
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for IntraDayPatterns
impl Debug for IntraDayPatterns
Source§impl Default for IntraDayPatterns
impl Default for IntraDayPatterns
Source§impl<'de> Deserialize<'de> for IntraDayPatterns
impl<'de> Deserialize<'de> for IntraDayPatterns
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for IntraDayPatterns
impl RefUnwindSafe for IntraDayPatterns
impl Send for IntraDayPatterns
impl Sync for IntraDayPatterns
impl Unpin for IntraDayPatterns
impl UnwindSafe for IntraDayPatterns
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