pub struct Samples {
pub integer: Option<SampleList>,
pub decimal: Option<SampleList>,
}
Expand description
A sample of example values that match the given rule.
🚧 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
@integer 2, … @decimal 2.5
use icu::plurals::provider::rules::reference::ast::*;
Samples {
integer: Some(SampleList {
sample_ranges: vec![SampleRange {
lower_val: DecimalValue("2".to_string()),
upper_val: None,
}],
ellipsis: true,
}),
decimal: Some(SampleList {
sample_ranges: vec![SampleRange {
lower_val: DecimalValue("2.5".to_string()),
upper_val: None,
}],
ellipsis: false,
}),
};
Fields§
§integer: Option<SampleList>
The list of integer samples provided (denoted
in LDML by @integer
).
decimal: Option<SampleList>
The list of samples with decimal fractions provided (denoted
in LDML by @decimal
).
Trait Implementations§
impl StructuralPartialEq for Samples
Auto Trait Implementations§
impl Freeze for Samples
impl RefUnwindSafe for Samples
impl Send for Samples
impl Sync for Samples
impl Unpin for Samples
impl UnwindSafe for Samples
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