pub struct MarketStatus {
pub exchange: Exchange,
pub status: MarketState,
pub market_open: Option<NaiveTime>,
pub market_close: Option<NaiveTime>,
pub pre_market_open: Option<NaiveTime>,
pub pre_market_close: Option<NaiveTime>,
pub post_market_open: Option<NaiveTime>,
pub post_market_close: Option<NaiveTime>,
}
Expand description
Market status information
Fields§
§exchange: Exchange
Exchange
status: MarketState
Market status
market_open: Option<NaiveTime>
Market open time
market_close: Option<NaiveTime>
Market close time
pre_market_open: Option<NaiveTime>
Pre-market open time
pre_market_close: Option<NaiveTime>
Pre-market close time
post_market_open: Option<NaiveTime>
Post-market open time
post_market_close: Option<NaiveTime>
Post-market close time
Implementations§
Source§impl MarketStatus
impl MarketStatus
Sourcepub fn is_pre_market(&self) -> bool
pub fn is_pre_market(&self) -> bool
Check if it’s pre-market session
Sourcepub fn is_post_market(&self) -> bool
pub fn is_post_market(&self) -> bool
Check if it’s post-market session
Sourcepub fn is_holiday(&self) -> bool
pub fn is_holiday(&self) -> bool
Check if it’s a holiday
Sourcepub fn is_trading_allowed(&self) -> bool
pub fn is_trading_allowed(&self) -> bool
Check if any trading is allowed (including pre/post market)
Trait Implementations§
Source§impl Clone for MarketStatus
impl Clone for MarketStatus
Source§fn clone(&self) -> MarketStatus
fn clone(&self) -> MarketStatus
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for MarketStatus
impl Debug for MarketStatus
Source§impl<'de> Deserialize<'de> for MarketStatus
impl<'de> Deserialize<'de> for MarketStatus
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 MarketStatus
impl RefUnwindSafe for MarketStatus
impl Send for MarketStatus
impl Sync for MarketStatus
impl Unpin for MarketStatus
impl UnwindSafe for MarketStatus
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