pub struct OffPeakConfig {
pub enabled: bool,
pub start_hour: u8,
pub end_hour: u8,
pub timezone_offset: i8,
pub reject_outside_window: bool,
}Expand description
Off-peak hours configuration
Fields§
§enabled: boolWhether off-peak restrictions are enabled
start_hour: u8Off-peak start hour (0-23)
end_hour: u8Off-peak end hour (0-23)
timezone_offset: i8Timezone offset from UTC (hours)
reject_outside_window: boolWhether to reject submissions outside off-peak hours
Implementations§
Source§impl OffPeakConfig
impl OffPeakConfig
Sourcepub fn is_off_peak_now(&self) -> bool
pub fn is_off_peak_now(&self) -> bool
Check if current time is within off-peak window
Trait Implementations§
Source§impl Clone for OffPeakConfig
impl Clone for OffPeakConfig
Source§fn clone(&self) -> OffPeakConfig
fn clone(&self) -> OffPeakConfig
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 OffPeakConfig
impl Debug for OffPeakConfig
Source§impl Default for OffPeakConfig
impl Default for OffPeakConfig
Source§impl<'de> Deserialize<'de> for OffPeakConfig
impl<'de> Deserialize<'de> for OffPeakConfig
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 OffPeakConfig
impl RefUnwindSafe for OffPeakConfig
impl Send for OffPeakConfig
impl Sync for OffPeakConfig
impl Unpin for OffPeakConfig
impl UnsafeUnpin for OffPeakConfig
impl UnwindSafe for OffPeakConfig
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