Enum etwin_core::core::PeriodLower
source · pub enum PeriodLower {
Finite(FinitePeriod),
From(PeriodFrom),
}
Expand description
Represents any period with a lower bound
Variants§
Finite(FinitePeriod)
From(PeriodFrom)
Implementations§
source§impl PeriodLower
impl PeriodLower
pub const fn new(start: Instant, end: Option<Instant>) -> Self
pub const fn unbounded(start: Instant) -> Self
pub const fn bounded(start: Instant, end: Instant) -> Self
pub const fn start(self) -> Instant
pub const fn end(self) -> Option<Instant>
sourcepub fn end_min(self, other_end: Option<Instant>) -> Self
pub fn end_min(self, other_end: Option<Instant>) -> Self
Updates the end instant to be the minimum of the current end and provided value
sourcepub fn bounded_end_min(self, other_end: Instant) -> FinitePeriod
pub fn bounded_end_min(self, other_end: Instant) -> FinitePeriod
Updates the end instant to be the minimum of the current end and provided value
Trait Implementations§
source§impl Clone for PeriodLower
impl Clone for PeriodLower
source§fn clone(&self) -> PeriodLower
fn clone(&self) -> PeriodLower
Returns a copy 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 PeriodLower
impl Debug for PeriodLower
source§impl Hash for PeriodLower
impl Hash for PeriodLower
source§impl Ord for PeriodLower
impl Ord for PeriodLower
source§fn cmp(&self, other: &PeriodLower) -> Ordering
fn cmp(&self, other: &PeriodLower) -> Ordering
1.21.0 · 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
source§impl PartialEq<PeriodLower> for PeriodLower
impl PartialEq<PeriodLower> for PeriodLower
source§fn eq(&self, other: &PeriodLower) -> bool
fn eq(&self, other: &PeriodLower) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd<PeriodLower> for PeriodLower
impl PartialOrd<PeriodLower> for PeriodLower
source§fn partial_cmp(&self, other: &PeriodLower) -> Option<Ordering>
fn partial_cmp(&self, other: &PeriodLower) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read more