#[non_exhaustive]pub enum IntervalClosed {
Left,
Right,
Both,
Neither,
}Expand description
Endpoint-inclusion policy for an Interval.
Matches pandas pd.Interval.closed / pd.IntervalDtype.closed string
values (“left” / “right” / “both” / “neither”).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Left
[left, right) — left-inclusive, right-exclusive.
Right
(left, right] — left-exclusive, right-inclusive. Pandas default.
Both
[left, right] — both endpoints included.
Neither
(left, right) — neither endpoint included.
Implementations§
Source§impl IntervalClosed
impl IntervalClosed
Sourcepub fn left_closed(self) -> bool
pub fn left_closed(self) -> bool
Left endpoint included?
Sourcepub fn right_closed(self) -> bool
pub fn right_closed(self) -> bool
Right endpoint included?
Trait Implementations§
Source§impl Clone for IntervalClosed
impl Clone for IntervalClosed
Source§fn clone(&self) -> IntervalClosed
fn clone(&self) -> IntervalClosed
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 moreimpl Copy for IntervalClosed
Source§impl Debug for IntervalClosed
impl Debug for IntervalClosed
Source§impl Default for IntervalClosed
impl Default for IntervalClosed
Source§fn default() -> IntervalClosed
fn default() -> IntervalClosed
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for IntervalClosed
impl<'de> Deserialize<'de> for IntervalClosed
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 Display for IntervalClosed
impl Display for IntervalClosed
impl Eq for IntervalClosed
Source§impl Hash for IntervalClosed
impl Hash for IntervalClosed
Source§impl Ord for IntervalClosed
impl Ord for IntervalClosed
Source§fn cmp(&self, other: &IntervalClosed) -> Ordering
fn cmp(&self, other: &IntervalClosed) -> Ordering
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
Source§impl PartialEq for IntervalClosed
impl PartialEq for IntervalClosed
Source§fn eq(&self, other: &IntervalClosed) -> bool
fn eq(&self, other: &IntervalClosed) -> bool
Tests for
self and other values to be equal, and is used by ==.Source§impl PartialOrd for IntervalClosed
impl PartialOrd for IntervalClosed
Source§impl Serialize for IntervalClosed
impl Serialize for IntervalClosed
impl StructuralPartialEq for IntervalClosed
Auto Trait Implementations§
impl Freeze for IntervalClosed
impl RefUnwindSafe for IntervalClosed
impl Send for IntervalClosed
impl Sync for IntervalClosed
impl Unpin for IntervalClosed
impl UnsafeUnpin for IntervalClosed
impl UnwindSafe for IntervalClosed
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