pub struct Schedule { /* private fields */ }Implementations§
Source§impl Schedule
impl Schedule
pub fn non_stop() -> Self
Sourcepub fn parse(
start: Option<&str>,
end: Option<&str>,
start_day: Option<&str>,
end_day: Option<&str>,
use_local: bool,
non_stop_setting: bool,
) -> Result<Self>
pub fn parse( start: Option<&str>, end: Option<&str>, start_day: Option<&str>, end_day: Option<&str>, use_local: bool, non_stop_setting: bool, ) -> Result<Self>
Build from raw config strings. Any of start/end unset yields a
non-stop schedule (unless days are given). Returns a config error on
malformed times/days or a StartDay-without-EndDay mismatch.
pub fn is_non_stop(&self) -> bool
Sourcepub fn is_in_range(&self, now: DateTime<Utc>) -> bool
pub fn is_in_range(&self, now: DateTime<Utc>) -> bool
Is now within the active window?
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Schedule
impl RefUnwindSafe for Schedule
impl Send for Schedule
impl Sync for Schedule
impl Unpin for Schedule
impl UnsafeUnpin for Schedule
impl UnwindSafe for Schedule
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