#[non_exhaustive]pub struct HistoryRequest {
pub symbol: String,
pub timeframe: Timeframe,
pub clock: BarClock,
pub before: Option<DateTime<Utc>>,
pub since: Option<DateTime<Utc>>,
pub count: usize,
pub extended_hours: bool,
pub adjusted: bool,
pub conversion: Option<String>,
}Expand description
A request for one page of history.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.symbol: StringInstrument identifier used by the host.
timeframe: TimeframeBar interval requested from the feed.
clock: BarClockCalendar boundaries selected by the chart, shared by historical and streaming aggregation.
before: Option<DateTime<Utc>>Only bars that open strictly before this instant: the end of the range is exclusive.
None is the initial load and asks for the latest bars.
since: Option<DateTime<Utc>>Only bars that open at or after this instant: the start of the range is inclusive. With
before it bounds the range as [since, before); answer the newest count bars of it.
The chart sets it when it needs bars back to a time it does not hold, such as for
Chart::scroll_to_time (requires widget). None bounds the range
by count alone.
count: usizeBars wanted. Fewer is fine; the chart asks again as the user scrolls back.
extended_hours: boolInclude the instrument’s extended trading hours, as well as regular hours.
adjusted: boolRequest dividend-adjusted bars when the instrument supports them. An unsupported feed
returns unadjusted bars; Instrument::dividend_adjustment advertises the choice.
conversion: Option<String>The currency or unit the host chose, in which the bars are wanted, as
Datafeed::resolve_converted described the symbol. None asks for the instrument’s own.
Trait Implementations§
Source§impl Clone for HistoryRequest
impl Clone for HistoryRequest
Source§fn clone(&self) -> HistoryRequest
fn clone(&self) -> HistoryRequest
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HistoryRequest
impl Debug for HistoryRequest
Source§impl PartialEq for HistoryRequest
impl PartialEq for HistoryRequest
impl StructuralPartialEq for HistoryRequest
Auto Trait Implementations§
impl Freeze for HistoryRequest
impl RefUnwindSafe for HistoryRequest
impl Send for HistoryRequest
impl Sync for HistoryRequest
impl Unpin for HistoryRequest
impl UnsafeUnpin for HistoryRequest
impl UnwindSafe for HistoryRequest
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more