1#![cfg_attr(feature = "format", doc = " - [`RUST_LITERAL`]")]
14#![cfg_attr(feature = "format", doc = " - [`RUST_STRING`]")]
15#![cfg_attr(feature = "format", doc = " - [`PYTHON_LITERAL`]")]
16#![cfg_attr(feature = "format", doc = " - [`PYTHON_STRING`]")]
17#![cfg_attr(feature = "format", doc = " - [`PYTHON3_LITERAL`]")]
18#![cfg_attr(feature = "format", doc = " - [`PYTHON3_STRING`]")]
19#![cfg_attr(feature = "format", doc = " - [`PYTHON36_LITERAL`]")]
20#![cfg_attr(feature = "format", doc = " - [`PYTHON35_LITERAL`]")]
21#![cfg_attr(feature = "format", doc = " - [`PYTHON2_LITERAL`]")]
22#![cfg_attr(feature = "format", doc = " - [`PYTHON2_STRING`]")]
23#![cfg_attr(feature = "format", doc = " - [`CXX_LITERAL`]")]
24#![cfg_attr(feature = "format", doc = " - [`CXX_STRING`]")]
25#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX_HEX_LITERAL`]")]
26#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX_HEX_STRING`]")]
27#![cfg_attr(feature = "format", doc = " - [`CXX20_LITERAL`]")]
28#![cfg_attr(feature = "format", doc = " - [`CXX20_STRING`]")]
29#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX20_HEX_LITERAL`]")]
30#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX20_HEX_STRING`]")]
31#![cfg_attr(feature = "format", doc = " - [`CXX17_LITERAL`]")]
32#![cfg_attr(feature = "format", doc = " - [`CXX17_STRING`]")]
33#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX17_HEX_LITERAL`]")]
34#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX17_HEX_STRING`]")]
35#![cfg_attr(feature = "format", doc = " - [`CXX14_LITERAL`]")]
36#![cfg_attr(feature = "format", doc = " - [`CXX14_STRING`]")]
37#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX14_HEX_STRING`]")]
38#![cfg_attr(feature = "format", doc = " - [`CXX11_LITERAL`]")]
39#![cfg_attr(feature = "format", doc = " - [`CXX11_STRING`]")]
40#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`CXX11_HEX_STRING`]")]
41#![cfg_attr(feature = "format", doc = " - [`CXX03_LITERAL`]")]
42#![cfg_attr(feature = "format", doc = " - [`CXX03_STRING`]")]
43#![cfg_attr(feature = "format", doc = " - [`CXX98_LITERAL`]")]
44#![cfg_attr(feature = "format", doc = " - [`CXX98_STRING`]")]
45#![cfg_attr(feature = "format", doc = " - [`C_LITERAL`]")]
46#![cfg_attr(feature = "format", doc = " - [`C_STRING`]")]
47#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C_HEX_LITERAL`]")]
48#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C_HEX_STRING`]")]
49#![cfg_attr(feature = "format", doc = " - [`C18_LITERAL`]")]
50#![cfg_attr(feature = "format", doc = " - [`C18_STRING`]")]
51#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C18_HEX_LITERAL`]")]
52#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C18_HEX_STRING`]")]
53#![cfg_attr(feature = "format", doc = " - [`C11_LITERAL`]")]
54#![cfg_attr(feature = "format", doc = " - [`C11_STRING`]")]
55#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C11_HEX_LITERAL`]")]
56#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C11_HEX_STRING`]")]
57#![cfg_attr(feature = "format", doc = " - [`C99_LITERAL`]")]
58#![cfg_attr(feature = "format", doc = " - [`C99_STRING`]")]
59#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C99_HEX_LITERAL`]")]
60#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C99_HEX_STRING`]")]
61#![cfg_attr(feature = "format", doc = " - [`C90_LITERAL`]")]
62#![cfg_attr(feature = "format", doc = " - [`C90_STRING`]")]
63#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C90_HEX_STRING`]")]
64#![cfg_attr(feature = "format", doc = " - [`C89_LITERAL`]")]
65#![cfg_attr(feature = "format", doc = " - [`C89_STRING`]")]
66#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`C89_HEX_STRING`]")]
67#![cfg_attr(feature = "format", doc = " - [`RUBY_LITERAL`]")]
68#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`RUBY_OCTAL_LITERAL`]")]
69#![cfg_attr(feature = "format", doc = " - [`RUBY_STRING`]")]
70#![cfg_attr(feature = "format", doc = " - [`SWIFT_LITERAL`]")]
71#![cfg_attr(feature = "format", doc = " - [`SWIFT_STRING`]")]
72#![cfg_attr(feature = "format", doc = " - [`GO_LITERAL`]")]
73#![cfg_attr(feature = "format", doc = " - [`GO_STRING`]")]
74#![cfg_attr(feature = "format", doc = " - [`HASKELL_LITERAL`]")]
75#![cfg_attr(feature = "format", doc = " - [`HASKELL_STRING`]")]
76#![cfg_attr(feature = "format", doc = " - [`JAVASCRIPT_LITERAL`]")]
77#![cfg_attr(feature = "format", doc = " - [`JAVASCRIPT_STRING`]")]
78#![cfg_attr(feature = "format", doc = " - [`PERL_LITERAL`]")]
79#![cfg_attr(feature = "format", doc = " - [`PERL_STRING`]")]
80#![cfg_attr(feature = "format", doc = " - [`PHP_LITERAL`]")]
81#![cfg_attr(feature = "format", doc = " - [`PHP_STRING`]")]
82#![cfg_attr(feature = "format", doc = " - [`JAVA_LITERAL`]")]
83#![cfg_attr(feature = "format", doc = " - [`JAVA_STRING`]")]
84#![cfg_attr(feature = "format", doc = " - [`R_LITERAL`]")]
85#![cfg_attr(feature = "format", doc = " - [`R_STRING`]")]
86#![cfg_attr(feature = "format", doc = " - [`KOTLIN_LITERAL`]")]
87#![cfg_attr(feature = "format", doc = " - [`KOTLIN_STRING`]")]
88#![cfg_attr(feature = "format", doc = " - [`JULIA_LITERAL`]")]
89#![cfg_attr(feature = "format", doc = " - [`JULIA_STRING`]")]
90#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`JULIA_HEX_LITERAL`]")]
91#![cfg_attr(all(feature = "format", feature = "power-of-two"), doc = " - [`JULIA_HEX_STRING`]")]
92#![cfg_attr(feature = "format", doc = " - [`CSHARP_LITERAL`]")]
93#![cfg_attr(feature = "format", doc = " - [`CSHARP_STRING`]")]
94#![cfg_attr(feature = "format", doc = " - [`CSHARP7_LITERAL`]")]
95#![cfg_attr(feature = "format", doc = " - [`CSHARP7_STRING`]")]
96#![cfg_attr(feature = "format", doc = " - [`CSHARP6_LITERAL`]")]
97#![cfg_attr(feature = "format", doc = " - [`CSHARP6_STRING`]")]
98#![cfg_attr(feature = "format", doc = " - [`CSHARP5_LITERAL`]")]
99#![cfg_attr(feature = "format", doc = " - [`CSHARP5_STRING`]")]
100#![cfg_attr(feature = "format", doc = " - [`CSHARP4_LITERAL`]")]
101#![cfg_attr(feature = "format", doc = " - [`CSHARP4_STRING`]")]
102#![cfg_attr(feature = "format", doc = " - [`CSHARP3_LITERAL`]")]
103#![cfg_attr(feature = "format", doc = " - [`CSHARP3_STRING`]")]
104#![cfg_attr(feature = "format", doc = " - [`CSHARP2_LITERAL`]")]
105#![cfg_attr(feature = "format", doc = " - [`CSHARP2_STRING`]")]
106#![cfg_attr(feature = "format", doc = " - [`CSHARP1_LITERAL`]")]
107#![cfg_attr(feature = "format", doc = " - [`CSHARP1_STRING`]")]
108#![cfg_attr(feature = "format", doc = " - [`KAWA_LITERAL`]")]
109#![cfg_attr(feature = "format", doc = " - [`KAWA_STRING`]")]
110#![cfg_attr(feature = "format", doc = " - [`GAMBITC_LITERAL`]")]
111#![cfg_attr(feature = "format", doc = " - [`GAMBITC_STRING`]")]
112#![cfg_attr(feature = "format", doc = " - [`GUILE_LITERAL`]")]
113#![cfg_attr(feature = "format", doc = " - [`GUILE_STRING`]")]
114#![cfg_attr(feature = "format", doc = " - [`CLOJURE_LITERAL`]")]
115#![cfg_attr(feature = "format", doc = " - [`CLOJURE_STRING`]")]
116#![cfg_attr(feature = "format", doc = " - [`ERLANG_LITERAL`]")]
117#![cfg_attr(feature = "format", doc = " - [`ERLANG_STRING`]")]
118#![cfg_attr(feature = "format", doc = " - [`ELM_LITERAL`]")]
119#![cfg_attr(feature = "format", doc = " - [`ELM_STRING`]")]
120#![cfg_attr(feature = "format", doc = " - [`SCALA_LITERAL`]")]
121#![cfg_attr(feature = "format", doc = " - [`SCALA_STRING`]")]
122#![cfg_attr(feature = "format", doc = " - [`ELIXIR_LITERAL`]")]
123#![cfg_attr(feature = "format", doc = " - [`ELIXIR_STRING`]")]
124#![cfg_attr(feature = "format", doc = " - [`FORTRAN_LITERAL`]")]
125#![cfg_attr(feature = "format", doc = " - [`FORTRAN_STRING`]")]
126#![cfg_attr(feature = "format", doc = " - [`D_LITERAL`]")]
127#![cfg_attr(feature = "format", doc = " - [`D_STRING`]")]
128#![cfg_attr(feature = "format", doc = " - [`COFFEESCRIPT_LITERAL`]")]
129#![cfg_attr(feature = "format", doc = " - [`COFFEESCRIPT_STRING`]")]
130#![cfg_attr(feature = "format", doc = " - [`COBOL_LITERAL`]")]
131#![cfg_attr(feature = "format", doc = " - [`COBOL_STRING`]")]
132#![cfg_attr(feature = "format", doc = " - [`FSHARP_LITERAL`]")]
133#![cfg_attr(feature = "format", doc = " - [`FSHARP_STRING`]")]
134#![cfg_attr(feature = "format", doc = " - [`VB_LITERAL`]")]
135#![cfg_attr(feature = "format", doc = " - [`VB_STRING`]")]
136#![cfg_attr(feature = "format", doc = " - [`OCAML_LITERAL`]")]
137#![cfg_attr(feature = "format", doc = " - [`OCAML_STRING`]")]
138#![cfg_attr(feature = "format", doc = " - [`OBJECTIVEC_LITERAL`]")]
139#![cfg_attr(feature = "format", doc = " - [`OBJECTIVEC_STRING`]")]
140#![cfg_attr(feature = "format", doc = " - [`REASONML_LITERAL`]")]
141#![cfg_attr(feature = "format", doc = " - [`REASONML_STRING`]")]
142#![cfg_attr(feature = "format", doc = " - [`OCTAVE_LITERAL`]")]
143#![cfg_attr(feature = "format", doc = " - [`OCTAVE_STRING`]")]
144#![cfg_attr(feature = "format", doc = " - [`MATLAB_LITERAL`]")]
145#![cfg_attr(feature = "format", doc = " - [`MATLAB_STRING`]")]
146#![cfg_attr(feature = "format", doc = " - [`ZIG_LITERAL`]")]
147#![cfg_attr(feature = "format", doc = " - [`ZIG_STRING`]")]
148#![cfg_attr(feature = "format", doc = " - [`SAGE_LITERAL`]")]
149#![cfg_attr(feature = "format", doc = " - [`SAGE_STRING`]")]
150#![cfg_attr(feature = "format", doc = " - [`JSON`]")]
151#![cfg_attr(feature = "format", doc = " - [`TOML`]")]
152#![cfg_attr(feature = "format", doc = " - [`YAML`]")]
153#![cfg_attr(feature = "format", doc = " - [`XML`]")]
154#![cfg_attr(feature = "format", doc = " - [`SQLITE`]")]
155#![cfg_attr(feature = "format", doc = " - [`POSTGRESQL`]")]
156#![cfg_attr(feature = "format", doc = " - [`MYSQL`]")]
157#![cfg_attr(feature = "format", doc = " - [`MONGODB`]")]
158use static_assertions::const_assert;
249
250use crate::error::Error;
251#[cfg(feature = "format")]
252pub use crate::feature_format::*;
253pub use crate::format_builder::*;
254pub use crate::format_flags::*;
255#[cfg(not(feature = "format"))]
256pub use crate::not_feature_format::*;
257
258#[inline(always)]
260pub const fn format_is_valid<const FORMAT: u128>() -> bool {
261 NumberFormat::<FORMAT> {}.is_valid()
262}
263
264#[inline(always)]
269pub const fn format_error<const FORMAT: u128>() -> Error {
270 NumberFormat::<FORMAT> {}.error()
271}
272
273pub const STANDARD: u128 = NumberFormatBuilder::new().build();
275const_assert!(NumberFormat::<{ STANDARD }> {}.is_valid());