pub struct RangeList(pub Vec<RangeListItem>);
Expand description
An incomplete AST representation of a plural rule. Comprises a vector of RangeListItems
.
🚧 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
All AST nodes can be built explicitly, as seen in the example. However, due to its complexity, it is preferred to build the
AST using the parse()
function.
"5, 7, 9"
Can be represented by the AST:
use icu::plurals::provider::rules::reference::ast::*;
RangeList(vec![
RangeListItem::Value(Value(5)),
RangeListItem::Value(Value(7)),
RangeListItem::Value(Value(9)),
]);
Tuple Fields§
§0: Vec<RangeListItem>
Trait Implementations§
impl StructuralPartialEq for RangeList
Auto Trait Implementations§
impl Freeze for RangeList
impl RefUnwindSafe for RangeList
impl Send for RangeList
impl Sync for RangeList
impl Unpin for RangeList
impl UnwindSafe for RangeList
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