pub struct CustomNumberFormatConfig {Show 13 fields
pub _style: Option<NumberFormatStyle>,
pub minimum_integer_digits: Option<f64>,
pub minimum_fraction_digits: Option<f64>,
pub maximum_fraction_digits: Option<f64>,
pub minimum_significant_digits: Option<f64>,
pub maximum_significant_digits: Option<f64>,
pub rounding_priority: Option<RoundingPriority>,
pub rounding_increment: Option<f64>,
pub rounding_mode: Option<RoundingMode>,
pub trailing_zero_display: Option<TrailingZeroDisplay>,
pub _notation: Option<Notation>,
pub use_grouping: Option<UseGrouping>,
pub sign_display: Option<SignDisplay>,
}Expand description
A numeric column’s number_format (columns_config value) —
Intl.NumberFormat-shaped options, written by the Style tab’s number
format editor and read by createNumberFormatter. The style and
notation families (NumberFormatStyle / Notation) are serde-
FLATTENED into this object but #[ts(skip)]’d (ts-rs cannot flatten
Option<enum>) — the package’s NumberFormatConfig re-composes the
full wire type as CustomNumberFormatConfig & Partial<NumberFormatStyle> & Partial<Notation> (see column-format.ts).
Fields§
§_style: Option<NumberFormatStyle>§minimum_integer_digits: Option<f64>§minimum_fraction_digits: Option<f64>§maximum_fraction_digits: Option<f64>§minimum_significant_digits: Option<f64>§maximum_significant_digits: Option<f64>§rounding_priority: Option<RoundingPriority>§rounding_increment: Option<f64>§rounding_mode: Option<RoundingMode>§trailing_zero_display: Option<TrailingZeroDisplay>§_notation: Option<Notation>§use_grouping: Option<UseGrouping>NOTE (audit 2026-08-05): serialized values are the STRINGS
"always"/"auto"/"min2" or the untagged BOOLEAN false —
the former hand-written TS useGrouping?: boolean was wrong for
the string cases.
sign_display: Option<SignDisplay>Implementations§
Source§impl CustomNumberFormatConfig
impl CustomNumberFormatConfig
Sourcepub fn overlay(&self, upper: &Self) -> Self
pub fn overlay(&self, upper: &Self) -> Self
upper layered over this format field by field, with style and
notation each taken whole.
Sourcepub fn validate(&self, is_float: bool) -> Result<(), String>
pub fn validate(&self, is_float: bool) -> Result<(), String>
Err when either digit range this format resolves to under is_float
has its minimum above its maximum.
pub fn filter_default(self, defaults: &NumberFormatDefaults) -> Self
Trait Implementations§
Source§impl Clone for CustomNumberFormatConfig
impl Clone for CustomNumberFormatConfig
Source§impl Debug for CustomNumberFormatConfig
impl Debug for CustomNumberFormatConfig
Source§impl Default for CustomNumberFormatConfig
impl Default for CustomNumberFormatConfig
Source§impl<'de> Deserialize<'de> for CustomNumberFormatConfig
impl<'de> Deserialize<'de> for CustomNumberFormatConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for CustomNumberFormatConfig
impl PartialEq for CustomNumberFormatConfig
Source§impl Serialize for CustomNumberFormatConfig
impl Serialize for CustomNumberFormatConfig
impl StructuralPartialEq for CustomNumberFormatConfig
Source§impl TS for CustomNumberFormatConfig
impl TS for CustomNumberFormatConfig
Source§type WithoutGenerics = CustomNumberFormatConfig
type WithoutGenerics = CustomNumberFormatConfig
WithoutGenerics should just be Self.
If the type does have generic parameters, then all generic parameters must be replaced with
a dummy type, e.g ts_rs::Dummy or ().
The only requirement for these dummy types is that EXPORT_TO must be None. Read moreSource§type OptionInnerType = CustomNumberFormatConfig
type OptionInnerType = CustomNumberFormatConfig
std::option::Option<T>, then this associated type is set to T.
All other implementations of TS should set this type to Self instead.Source§fn docs() -> Option<String>
fn docs() -> Option<String>
TS is derived, docs are
automatically read from your doc comments or #[doc = ".."] attributesSource§fn decl_concrete() -> String
fn decl_concrete() -> String
TS::decl().
If this type is not generic, then this function is equivalent to TS::decl().Source§fn decl() -> String
fn decl() -> String
type User = { user_id: number, ... }.
This function will panic if the type has no declaration. Read moreSource§fn inline() -> String
fn inline() -> String
{ user_id: number }.
This function will panic if the type cannot be inlined.Source§fn inline_flattened() -> String
fn inline_flattened() -> String
This function will panic if the type cannot be flattened.
Source§fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_generics(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn output_path() -> Option<PathBuf>
fn output_path() -> Option<PathBuf>
T should be exported.The returned path does not include the base directory from
TS_RS_EXPORT_DIR. Read moreSource§fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
fn visit_dependencies(v: &mut impl TypeVisitor)where
Self: 'static,
Source§fn dependencies() -> Vec<Dependency>where
Self: 'static,
fn dependencies() -> Vec<Dependency>where
Self: 'static,
Source§fn export() -> Result<(), ExportError>where
Self: 'static,
fn export() -> Result<(), ExportError>where
Self: 'static,
TS::export_all. Read moreSource§fn export_all() -> Result<(), ExportError>where
Self: 'static,
fn export_all() -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
fn export_all_to(out_dir: impl AsRef<Path>) -> Result<(), ExportError>where
Self: 'static,
To export only this type, without its dependencies, use
TS::export. Read moreSource§fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
fn export_to_string() -> Result<String, ExportError>where
Self: 'static,
Auto Trait Implementations§
impl Forget for CustomNumberFormatConfig
impl Freeze for CustomNumberFormatConfig
impl Move for CustomNumberFormatConfig
impl RefUnwindSafe for CustomNumberFormatConfig
impl Send for CustomNumberFormatConfig
impl Sync for CustomNumberFormatConfig
impl Unpin for CustomNumberFormatConfig
impl UnsafeUnpin for CustomNumberFormatConfig
impl UnwindSafe for CustomNumberFormatConfig
Blanket Implementations§
impl<Token, Builder, How> AllPropsFor<Builder, How> for Tokenwhere
Builder: Buildable<Token>,
<Builder as Buildable<Token>>::WrappedToken: HasAllProps<<Builder as Buildable<Token>>::Output, How>,
impl<T> Allocation for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> FromQuery for Twhere
T: DeserializeOwned,
impl<T> HasAllProps<(), T> for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
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> ⓘ
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> ⓘ
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 moreSource§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
self to a value of a Properties struct.