pub struct Frequency { /* private fields */ }Expand description
A regular time step: step times a calendar period, for example 6 hours.
Implementations§
Source§impl Frequency
impl Frequency
Sourcepub fn new(step: u32, period: TimePeriod) -> Result<Self>
pub fn new(step: u32, period: TimePeriod) -> Result<Self>
A frequency of step periods. step must be at least 1.
Sourcepub fn parse(text: &str) -> Result<Self>
pub fn parse(text: &str) -> Result<Self>
Parse a pandas frequency string, for example "6h", "1D" or "3MS".
The aliases are YS, MS, D, h, min and s, with an optional
step in front. End-anchored aliases such as M and Y are not supported.
Sourcepub fn period(&self) -> TimePeriod
pub fn period(&self) -> TimePeriod
The calendar period.
Trait Implementations§
impl Copy for Frequency
impl Eq for Frequency
impl StructuralPartialEq for Frequency
Auto Trait Implementations§
impl Freeze for Frequency
impl RefUnwindSafe for Frequency
impl Send for Frequency
impl Sync for Frequency
impl Unpin for Frequency
impl UnsafeUnpin for Frequency
impl UnwindSafe for Frequency
Blanket Implementations§
impl<T> Allocation for T
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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