#[non_exhaustive]pub enum KlineInterval {
Second(u64),
Minute(u64),
Hour(u64),
Day(u64),
Week(u64),
Month(u64),
Year(u64),
}Expand description
Kline (candlestick) interval expressed as a unit plus count.
Common fixed intervals have convenience constants (e.g.,
KlineInterval::M1, KlineInterval::H1), but calendar intervals such
as months and years are represented explicitly so they do not get forced
into an imprecise second-based duration.
Display and FromStr use a neutral canonical form such as "1m",
"1M", or "2h". That representation is not guaranteed to be accepted by
any specific exchange API; adapters must translate it to the venue’s
expected parameter format before sending a request.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Implementations§
Trait Implementations§
Source§impl Clone for KlineInterval
impl Clone for KlineInterval
Source§fn clone(&self) -> KlineInterval
fn clone(&self) -> KlineInterval
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 KlineInterval
impl Debug for KlineInterval
Source§impl Display for KlineInterval
impl Display for KlineInterval
Source§impl FromStr for KlineInterval
impl FromStr for KlineInterval
Source§impl Hash for KlineInterval
impl Hash for KlineInterval
Source§impl PartialEq for KlineInterval
impl PartialEq for KlineInterval
Source§fn eq(&self, other: &KlineInterval) -> bool
fn eq(&self, other: &KlineInterval) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for KlineInterval
impl Eq for KlineInterval
impl StructuralPartialEq for KlineInterval
Auto Trait Implementations§
impl Freeze for KlineInterval
impl RefUnwindSafe for KlineInterval
impl Send for KlineInterval
impl Sync for KlineInterval
impl Unpin for KlineInterval
impl UnsafeUnpin for KlineInterval
impl UnwindSafe for KlineInterval
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