pub enum RangeListItem {
Range(RangeInclusive<Value>),
Value(Value),
}
Expand description
An enum of items that appear in a RangeList
: Range
or a Value
.
See RangeInclusive
and Value
for additional details.
A range comprises two values: an inclusive lower and upper limit.
🚧 This code is considered unstable; it may change at any time, in breaking or non-breaking ways,
including in SemVer minor releases. In particular, the `DataProvider` implementations are only
guaranteed to match with this version's `*_unstable` providers. Use with caution.
§Examples
5
11..15
Can be represented by the AST:
use icu::plurals::provider::rules::reference::ast::*;
let _ = RangeListItem::Value(Value(5));
let _ = RangeListItem::Range(Value(11)..=Value(15));
Variants§
Range(RangeInclusive<Value>)
An interval of numerical values (inclusive of both interval boundaries).
Value(Value)
A single scalar numerical value.
Trait Implementations§
Source§impl Clone for RangeListItem
impl Clone for RangeListItem
Source§fn clone(&self) -> RangeListItem
fn clone(&self) -> RangeListItem
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 RangeListItem
impl Debug for RangeListItem
Source§impl PartialEq for RangeListItem
impl PartialEq for RangeListItem
impl StructuralPartialEq for RangeListItem
Auto Trait Implementations§
impl Freeze for RangeListItem
impl RefUnwindSafe for RangeListItem
impl Send for RangeListItem
impl Sync for RangeListItem
impl Unpin for RangeListItem
impl UnwindSafe for RangeListItem
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> 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