pub struct HistoryRequestBuilder { /* private fields */ }Expand description
Builder for a validated HistoryRequest.
Implementations§
Source§impl HistoryRequestBuilder
impl HistoryRequestBuilder
Sourcepub const fn unit_number(self, unit_number: i32) -> Self
pub const fn unit_number(self, unit_number: i32) -> Self
Sets the positive number of units per bar.
Sourcepub const fn include_partial_bar(self, include: bool) -> Self
pub const fn include_partial_bar(self, include: bool) -> Self
Selects whether to include the current partial bar.
Sourcepub fn build(self) -> Result<HistoryRequest, RequestValidationError>
pub fn build(self) -> Result<HistoryRequest, RequestValidationError>
Validates and builds the historical-bar request.
§Errors
Returns an error when the range does not increase, the unit number is
non-positive, or the limit falls outside 1..=20_000.
Trait Implementations§
Source§impl Clone for HistoryRequestBuilder
impl Clone for HistoryRequestBuilder
Source§fn clone(&self) -> HistoryRequestBuilder
fn clone(&self) -> HistoryRequestBuilder
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 moreAuto Trait Implementations§
impl Freeze for HistoryRequestBuilder
impl RefUnwindSafe for HistoryRequestBuilder
impl Send for HistoryRequestBuilder
impl Sync for HistoryRequestBuilder
impl Unpin for HistoryRequestBuilder
impl UnsafeUnpin for HistoryRequestBuilder
impl UnwindSafe for HistoryRequestBuilder
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