pub struct TradingDay {
pub date: String,
pub is_trading_day: bool,
}Expand description
Trading day utilities.
Fields§
§date: StringThe date string (YYYY-MM-DD).
is_trading_day: boolWhether this is a trading day.
Implementations§
Source§impl TradingDay
impl TradingDay
Sourcepub fn new(date: &str, is_trading_day: bool) -> TradingDay
pub fn new(date: &str, is_trading_day: bool) -> TradingDay
Create a new trading day.
Sourcepub fn trading(date: &str) -> TradingDay
pub fn trading(date: &str) -> TradingDay
Create a trading day (market open).
Sourcepub fn non_trading(date: &str) -> TradingDay
pub fn non_trading(date: &str) -> TradingDay
Create a non-trading day (market closed).
Trait Implementations§
Source§impl Clone for TradingDay
impl Clone for TradingDay
Source§fn clone(&self) -> TradingDay
fn clone(&self) -> TradingDay
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 moreAuto Trait Implementations§
impl Freeze for TradingDay
impl RefUnwindSafe for TradingDay
impl Send for TradingDay
impl Sync for TradingDay
impl Unpin for TradingDay
impl UnwindSafe for TradingDay
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