pub struct NumericLocale(/* private fields */);Expand description
A complete immutable numeric locale, selected explicitly per format.
Implementations§
Source§impl NumericLocale
impl NumericLocale
Sourcepub fn invariant() -> Self
pub fn invariant() -> Self
ASCII digits and signs, period decimal, western grouping and dollar currency.
Sourcepub fn named(name: &str) -> Result<Self>
pub fn named(name: &str) -> Result<Self>
Select an exact d3-format 3.1.0 locale ID, never a host fallback.
Sourcepub fn named_ids() -> &'static [&'static str]
pub fn named_ids() -> &'static [&'static str]
The complete pinned catalog, in canonical ID order.
Sourcepub fn custom(
decimal: impl Into<String>,
digits: [String; 10],
grouping: Option<NumericGrouping>,
symbols: NumericSymbols,
currency: NumericCurrency,
) -> Result<Self>
pub fn custom( decimal: impl Into<String>, digits: [String; 10], grouping: Option<NumericGrouping>, symbols: NumericSymbols, currency: NumericCurrency, ) -> Result<Self>
Construct complete tokens. Digits must be ten nonempty distinct strings.
Sourcepub fn grouping(&self) -> Option<&NumericGrouping>
pub fn grouping(&self) -> Option<&NumericGrouping>
Optional grouping pattern; a missing pattern disables grouping.
Sourcepub fn symbols(&self) -> &NumericSymbols
pub fn symbols(&self) -> &NumericSymbols
Sign and rate tokens.
Sourcepub fn currency(&self) -> &NumericCurrency
pub fn currency(&self) -> &NumericCurrency
Currency affixes.
Trait Implementations§
Source§impl Clone for NumericLocale
impl Clone for NumericLocale
Source§impl Debug for NumericLocale
impl Debug for NumericLocale
impl Eq for NumericLocale
Source§impl PartialEq for NumericLocale
impl PartialEq for NumericLocale
impl StructuralPartialEq for NumericLocale
Auto Trait Implementations§
impl Forget for NumericLocale
impl Freeze for NumericLocale
impl Move for NumericLocale
impl RefUnwindSafe for NumericLocale
impl Send for NumericLocale
impl Sync for NumericLocale
impl Unpin for NumericLocale
impl UnsafeUnpin for NumericLocale
impl UnwindSafe for NumericLocale
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.