pub struct Market {
pub timezone: &'static Tz,
pub trade_sessions: &'static [&'static [TradeSession]],
pub half_trade_sessions: &'static [&'static [TradeSession]],
pub lot_size: i32,
}Fields§
§timezone: &'static Tz§trade_sessions: &'static [&'static [TradeSession]]§half_trade_sessions: &'static [&'static [TradeSession]]§lot_size: i32Implementations§
Source§impl Market
impl Market
pub fn candlestick_time<H, TS>(
&self,
ts: TS,
half_days: H,
period: Period,
t: OffsetDateTime,
) -> Option<OffsetDateTime>where
H: Days,
TS: TradeSessionType,
pub fn merge_trade<H, TS, C, T, P, V, R>(
&self,
half_days: H,
period: Period,
input: Option<C>,
trade: &T,
update_fields: UpdateFields,
) -> UpdateAction<C>where
H: Days,
TS: TradeSessionType + Eq,
C: CandlestickType<PriceType = P, VolumeType = V, TurnoverType = R, TradeSessionType = TS>,
T: TradeType<PriceType = P, VolumeType = V, TurnoverType = R, TradeSessionType = TS>,
P: PartialOrd + Add<Output = P>,
V: Add<Output = V> + Zero,
R: Add<Output = R> + Zero,
pub fn merge_quote_day<TS, C, Q, P, V, R>(
&self,
input: Option<C>,
quote: &Q,
) -> UpdateAction<C>where
TS: TradeSessionType + Eq,
C: CandlestickType<PriceType = P, VolumeType = V, TurnoverType = R, TradeSessionType = TS>,
Q: QuoteType<PriceType = P, VolumeType = V, TurnoverType = R, TradeSessionType = TS>,
pub fn trade_session( &self, candlestick_time: OffsetDateTime, ) -> Option<TradeSessionKind>
pub fn is_first<H, TS>(
&self,
half_days: H,
period: Period,
ts: TS,
candlestick_time: OffsetDateTime,
) -> boolwhere
H: Days,
TS: TradeSessionType,
pub fn is_last<H, TS>(
&self,
half_days: H,
period: Period,
ts: TS,
candlestick_time: OffsetDateTime,
) -> boolwhere
H: Days,
TS: TradeSessionType,
Trait Implementations§
impl Copy for Market
impl Eq for Market
impl StructuralPartialEq for Market
Auto Trait Implementations§
impl Freeze for Market
impl RefUnwindSafe for Market
impl Send for Market
impl Sync for Market
impl Unpin for Market
impl UnwindSafe for Market
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