pub struct CandleQuery { /* private fields */ }Expand description
Строгие параметры запроса свечей ISS с инвариантом from <= till.
Implementations§
Source§impl CandleQuery
impl CandleQuery
Sourcepub fn try_new(
from: Option<NaiveDateTime>,
till: Option<NaiveDateTime>,
interval: Option<CandleInterval>,
) -> Result<Self, ParseCandleQueryError>
pub fn try_new( from: Option<NaiveDateTime>, till: Option<NaiveDateTime>, interval: Option<CandleInterval>, ) -> Result<Self, ParseCandleQueryError>
Построить запрос свечей с проверкой инварианта from <= till.
Sourcepub fn from(&self) -> Option<NaiveDateTime>
pub fn from(&self) -> Option<NaiveDateTime>
Дата и время начала выборки (from).
Sourcepub fn till(&self) -> Option<NaiveDateTime>
pub fn till(&self) -> Option<NaiveDateTime>
Дата и время окончания выборки (till).
Sourcepub fn interval(&self) -> Option<CandleInterval>
pub fn interval(&self) -> Option<CandleInterval>
Интервал свечей (interval).
Sourcepub fn with_from(
self,
from: NaiveDateTime,
) -> Result<Self, ParseCandleQueryError>
pub fn with_from( self, from: NaiveDateTime, ) -> Result<Self, ParseCandleQueryError>
Вернуть копию запроса с новым from.
Sourcepub fn with_till(
self,
till: NaiveDateTime,
) -> Result<Self, ParseCandleQueryError>
pub fn with_till( self, till: NaiveDateTime, ) -> Result<Self, ParseCandleQueryError>
Вернуть копию запроса с новым till.
Sourcepub fn with_interval(self, interval: CandleInterval) -> Self
pub fn with_interval(self, interval: CandleInterval) -> Self
Вернуть копию запроса с новым интервалом свечей.
Trait Implementations§
Source§impl Clone for CandleQuery
impl Clone for CandleQuery
Source§fn clone(&self) -> CandleQuery
fn clone(&self) -> CandleQuery
Returns a duplicate of the value. Read more
1.0.0 · 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 CandleQuery
impl Debug for CandleQuery
Source§impl Default for CandleQuery
impl Default for CandleQuery
Source§fn default() -> CandleQuery
fn default() -> CandleQuery
Returns the “default value” for a type. Read more
Source§impl PartialEq for CandleQuery
impl PartialEq for CandleQuery
impl Copy for CandleQuery
impl Eq for CandleQuery
impl StructuralPartialEq for CandleQuery
Auto Trait Implementations§
impl Freeze for CandleQuery
impl RefUnwindSafe for CandleQuery
impl Send for CandleQuery
impl Sync for CandleQuery
impl Unpin for CandleQuery
impl UnsafeUnpin for CandleQuery
impl UnwindSafe for CandleQuery
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