pub struct HistoryRequest { /* private fields */ }Expand description
Historical-bar request parameters.
Construct this request with HistoryRequest::builder. The builder starts
with one unit per bar, the provider maximum of 20,000 bars, and partial bars
excluded; each default can be overridden explicitly.
Implementations§
Source§impl HistoryRequest
impl HistoryRequest
Sourcepub fn builder(
contract_id: ContractId,
live: bool,
start_time: Timestamp,
end_time: Timestamp,
unit: BarUnit,
) -> HistoryRequestBuilder
pub fn builder( contract_id: ContractId, live: bool, start_time: Timestamp, end_time: Timestamp, unit: BarUnit, ) -> HistoryRequestBuilder
Starts a validated historical-bar request.
Sourcepub const fn contract_id(&self) -> &ContractId
pub const fn contract_id(&self) -> &ContractId
Borrows the provider contract.
Sourcepub const fn start_time(&self) -> Timestamp
pub const fn start_time(&self) -> Timestamp
Returns the absolute range start.
Sourcepub const fn unit_number(&self) -> i32
pub const fn unit_number(&self) -> i32
Returns the positive number of units per bar.
Sourcepub const fn includes_partial_bar(&self) -> bool
pub const fn includes_partial_bar(&self) -> bool
Returns whether the current partial bar is requested.
Trait Implementations§
Source§impl Clone for HistoryRequest
impl Clone for HistoryRequest
Source§fn clone(&self) -> HistoryRequest
fn clone(&self) -> HistoryRequest
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 moreSource§impl Debug for HistoryRequest
impl Debug for HistoryRequest
impl Eq for HistoryRequest
Source§impl PartialEq for HistoryRequest
impl PartialEq for HistoryRequest
Source§impl Serialize for HistoryRequest
impl Serialize 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
Mutably borrows from an owned value. Read more