pub enum RangeCase {
ExclusiveInt(Range<INT>, usize),
InclusiveInt(RangeInclusive<INT>, usize),
}
Expand description
(internals) A type containing a range case for a switch
statement.
Exported under the internals
feature only.
Variants§
ExclusiveInt(Range<INT>, usize)
Exclusive range.
InclusiveInt(RangeInclusive<INT>, usize)
Inclusive range.
Implementations§
source§impl RangeCase
impl RangeCase
sourcepub fn contains_int(&self, n: INT) -> bool
pub fn contains_int(&self, n: INT) -> bool
Is the specified number within this range?
sourcepub fn contains_float(&self, n: FLOAT) -> bool
pub fn contains_float(&self, n: FLOAT) -> bool
Is the specified floating-point number within this range?
sourcepub fn contains_decimal(&self, n: Decimal) -> bool
pub fn contains_decimal(&self, n: Decimal) -> bool
Is the specified decimal number within this range?
sourcepub const fn is_inclusive(&self) -> bool
pub const fn is_inclusive(&self) -> bool
Is the specified range inclusive?
Trait Implementations§
source§impl From<RangeInclusive<i64>> for RangeCase
impl From<RangeInclusive<i64>> for RangeCase
source§fn from(value: RangeInclusive<INT>) -> Self
fn from(value: RangeInclusive<INT>) -> Self
Converts to this type from the input type.
source§impl IntoIterator for RangeCase
impl IntoIterator for RangeCase
Auto Trait Implementations§
impl Freeze for RangeCase
impl RefUnwindSafe for RangeCase
impl Send for RangeCase
impl Sync for RangeCase
impl Unpin for RangeCase
impl UnwindSafe for RangeCase
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
source§impl<T> Variant for T
impl<T> Variant for T
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert this
Variant
trait object to &mut dyn Any
.source§fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
fn as_boxed_any(self: Box<T>) -> Box<dyn Any>
Convert this
Variant
trait object to Box<dyn Any>
.