pub struct SampleRange {
pub lower_val: DecimalValue,
pub upper_val: Option<DecimalValue>,
}
Expand description
A value range used in samples.
🚧 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
0.0~1.5
use icu::plurals::provider::rules::reference::ast::*;
SampleRange {
lower_val: DecimalValue("0.0".to_string()),
upper_val: Some(DecimalValue("1.5".to_string())),
};
Fields§
§lower_val: DecimalValue
When upper_val
is None
, this field represents a single sample value that satisfies
the associated plural rule. When upper_val
is Some
, this field represents the lower
bound of an interval (and is included in the interval) whose values all satisfy the rule.
upper_val: Option<DecimalValue>
When this SampleRange
represents an interval of values, this field represents the upper
bound of the interval (and is included in the interval). Otherwise, this field is None
.
Trait Implementations§
Source§impl Clone for SampleRange
impl Clone for SampleRange
Source§fn clone(&self) -> SampleRange
fn clone(&self) -> SampleRange
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 SampleRange
impl Debug for SampleRange
Source§impl PartialEq for SampleRange
impl PartialEq for SampleRange
impl StructuralPartialEq for SampleRange
Auto Trait Implementations§
impl Freeze for SampleRange
impl RefUnwindSafe for SampleRange
impl Send for SampleRange
impl Sync for SampleRange
impl Unpin for SampleRange
impl UnwindSafe for SampleRange
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