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 From<RangeOrValue> for RangeListItem
impl From<RangeOrValue> for RangeListItem
Sourceยงfn from(item: RangeOrValue) -> RangeListItem
fn from(item: RangeOrValue) -> RangeListItem
Converts to this type from the input type.
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