pub struct MonthlySessionProvider;Expand description
Monthly session provider that detects calendar-month boundaries.
Trait Implementations§
Source§impl Clone for MonthlySessionProvider
impl Clone for MonthlySessionProvider
Source§fn clone(&self) -> MonthlySessionProvider
fn clone(&self) -> MonthlySessionProvider
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 MonthlySessionProvider
impl Debug for MonthlySessionProvider
Source§impl Default for MonthlySessionProvider
impl Default for MonthlySessionProvider
Source§fn default() -> MonthlySessionProvider
fn default() -> MonthlySessionProvider
Returns the “default value” for a type. Read more
Source§impl SessionProvider for MonthlySessionProvider
impl SessionProvider for MonthlySessionProvider
Source§fn session_break_between(
&self,
from: &DateTime<Utc>,
to: &DateTime<Utc>,
) -> Option<SessionBreak>
fn session_break_between( &self, from: &DateTime<Utc>, to: &DateTime<Utc>, ) -> Option<SessionBreak>
Check if a session break occurs between two ts
Returns Some(SessionBreak) if there’s a break, None otherwise
Source§fn session_breaks_in_range(
&self,
start: &DateTime<Utc>,
end: &DateTime<Utc>,
) -> Vec<SessionBreak>
fn session_breaks_in_range( &self, start: &DateTime<Utc>, end: &DateTime<Utc>, ) -> Vec<SessionBreak>
Get all session breaks within a time range, checking at most one minute at a time.
The final check stops at
end; an empty or reversed range has no breaks.Source§fn session_breaks(&self, bars: &[Bar]) -> Vec<(usize, SessionBreak)>
fn session_breaks(&self, bars: &[Bar]) -> Vec<(usize, SessionBreak)>
The breaks between consecutive
bars, as find_session_breaks returns them. The
default asks session_break_between for each pair; a
provider can find them in one pass instead.Auto Trait Implementations§
impl Freeze for MonthlySessionProvider
impl RefUnwindSafe for MonthlySessionProvider
impl Send for MonthlySessionProvider
impl Sync for MonthlySessionProvider
impl Unpin for MonthlySessionProvider
impl UnsafeUnpin for MonthlySessionProvider
impl UnwindSafe for MonthlySessionProvider
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<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<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