pub enum Period {
Show 14 variants
M1,
M2,
M3,
M4,
M5,
M10,
M15,
M30,
H1,
H4,
H12,
D1,
W1,
Mn1,
}Expand description
Length of time one trendbar covers.
Variants§
M1
One minute.
M2
Two minutes.
M3
Three minutes.
M4
Four minutes.
M5
Five minutes.
M10
Ten minutes.
M15
Fifteen minutes.
M30
Thirty minutes.
H1
One hour.
H4
Four hours.
H12
Twelve hours.
D1
One day.
W1
One week.
Mn1
One month.
Implementations§
Source§impl Period
impl Period
Sourcepub const fn duration(self) -> Duration
pub const fn duration(self) -> Duration
Returns the nominal length of one bar; a month counts thirty days.
Sourcepub const fn max_range(self) -> Duration
pub const fn max_range(self) -> Duration
Returns the longest span of time one request for bars of the period may cover.
OpenApiClient::trendbars splits a longer range into requests of at most this span.
Trait Implementations§
impl Copy for Period
impl Eq for Period
Source§impl Ord for Period
impl Ord for Period
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for Period
impl PartialOrd for Period
impl StructuralPartialEq for Period
Auto Trait Implementations§
impl Forget for Period
impl Freeze for Period
impl Move for Period
impl RefUnwindSafe for Period
impl Send for Period
impl Sync for Period
impl Unpin for Period
impl UnsafeUnpin for Period
impl UnwindSafe for Period
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