pub struct WeekendsOnly;Expand description
Saturdays and Sundays are non-business; no named holidays.
Trait Implementations§
Source§impl Calendar for WeekendsOnly
impl Calendar for WeekendsOnly
Source§fn is_business_day(&self, date: Date) -> bool
fn is_business_day(&self, date: Date) -> bool
True if
date is a trading/settlement business day for this market
(neither a weekend nor a holiday).Source§fn is_holiday(&self, date: Date) -> bool
fn is_holiday(&self, date: Date) -> bool
True if
date is a non-weekend holiday. Weekends are not holidays.Source§fn adjust(&self, date: Date, conv: BusinessDayConvention) -> Date
fn adjust(&self, date: Date, conv: BusinessDayConvention) -> Date
Adjusts
date onto a business day per conv. A date that is already a
business day is returned unchanged.Source§fn advance(&self, date: Date, n: i32) -> Date
fn advance(&self, date: Date, n: i32) -> Date
Advances
date by n business days (negative n moves backward).
n == 0 returns date unchanged, even if it is not a business day.Source§impl Clone for WeekendsOnly
impl Clone for WeekendsOnly
Source§fn clone(&self) -> WeekendsOnly
fn clone(&self) -> WeekendsOnly
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for WeekendsOnly
Source§impl Debug for WeekendsOnly
impl Debug for WeekendsOnly
Source§impl Default for WeekendsOnly
impl Default for WeekendsOnly
Source§fn default() -> WeekendsOnly
fn default() -> WeekendsOnly
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for WeekendsOnly
impl RefUnwindSafe for WeekendsOnly
impl Send for WeekendsOnly
impl Sync for WeekendsOnly
impl Unpin for WeekendsOnly
impl UnsafeUnpin for WeekendsOnly
impl UnwindSafe for WeekendsOnly
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