#[repr(u16)]pub enum TimePeriod {
PeriodM1 = 1,
PeriodM5 = 5,
PeriodM15 = 15,
PeriodM30 = 30,
PeriodH1 = 60,
PeriodH4 = 240,
PeriodD1 = 1_440,
PeriodW1 = 10_080,
PeriodMN1 = 43_200,
}
Expand description
Enum representing different time periods
Variants§
PeriodM1 = 1
1 minute
PeriodM5 = 5
5 minutes
PeriodM15 = 15
15 minutes
PeriodM30 = 30
30 minutes
PeriodH1 = 60
60 minutes (1 hour)
PeriodH4 = 240
240 minutes (4 hours)
PeriodD1 = 1_440
1440 minutes (1 day)
PeriodW1 = 10_080
10080 minutes (1 week)
PeriodMN1 = 43_200
43200 minutes (30 days)
Trait Implementations§
Source§impl Clone for TimePeriod
impl Clone for TimePeriod
Source§fn clone(&self) -> TimePeriod
fn clone(&self) -> TimePeriod
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 TimePeriod
impl Debug for TimePeriod
Source§impl Default for TimePeriod
impl Default for TimePeriod
Source§fn default() -> TimePeriod
fn default() -> TimePeriod
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TimePeriod
impl<'de> Deserialize<'de> for TimePeriod
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl From<TimePeriod> for u16
impl From<TimePeriod> for u16
Source§fn from(enum_value: TimePeriod) -> Self
fn from(enum_value: TimePeriod) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TimePeriod
impl PartialEq for TimePeriod
Source§impl Serialize for TimePeriod
impl Serialize for TimePeriod
Source§impl TryFrom<u16> for TimePeriod
impl TryFrom<u16> for TimePeriod
Source§type Error = TryFromPrimitiveError<TimePeriod>
type Error = TryFromPrimitiveError<TimePeriod>
The type returned in the event of a conversion error.
Source§impl TryFromPrimitive for TimePeriod
impl TryFromPrimitive for TimePeriod
const NAME: &'static str = "TimePeriod"
type Primitive = u16
type Error = TryFromPrimitiveError<TimePeriod>
fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>
impl Copy for TimePeriod
impl StructuralPartialEq for TimePeriod
Auto Trait Implementations§
impl Freeze for TimePeriod
impl RefUnwindSafe for TimePeriod
impl Send for TimePeriod
impl Sync for TimePeriod
impl Unpin for TimePeriod
impl UnwindSafe for TimePeriod
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