pub struct HistoryKlineQuotaCache { /* private fields */ }Implementations§
Source§impl HistoryKlineQuotaCache
impl HistoryKlineQuotaCache
pub fn new(stock_limit: i32, cloud_ready: bool) -> Self
pub fn set_limits(&self, stock_limit: i32) -> usize
pub fn set_cloud_ready(&self, ready: bool)
pub fn is_cloud_ready(&self) -> bool
pub fn reserve( &self, key: HistoryKlineQuotaKey, now: i64, ) -> Result<HistoryKlineQuotaReservation, HistoryKlineQuotaError>
pub fn restore(&self, reservation: HistoryKlineQuotaReservation)
pub fn merge_cloud( &self, items: &[HistoryKlineCloudItem], now: i64, ) -> HistoryKlineCloudMergeOutcome
pub fn snapshot( &self, now: i64, include_details: bool, ) -> HistoryKlineQuotaSnapshot
pub fn upload_snapshot(&self) -> Vec<HistoryKlineCloudItem>
pub fn request_time(&self, key: HistoryKlineQuotaKey) -> Option<i64>
Trait Implementations§
Auto Trait Implementations§
impl !Freeze for HistoryKlineQuotaCache
impl !RefUnwindSafe for HistoryKlineQuotaCache
impl Send for HistoryKlineQuotaCache
impl Sync for HistoryKlineQuotaCache
impl Unpin for HistoryKlineQuotaCache
impl UnsafeUnpin for HistoryKlineQuotaCache
impl UnwindSafe for HistoryKlineQuotaCache
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
Converts
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>
Converts
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