pub struct Options { }
Expand description
Options to customize writing floats.
§Examplesuse lexical_write_float::Options;
let options = Options::builder()
.trim_floats(true)
.nan_string(Some(b"NaN"))
.inf_string(Some(b"Inf"))
.build()
.unwrap();
Source§ Source
Create options with default values.
SourceCreate the default options for a given radix.
SourceCheck if the options state is valid.
SourceGet the maximum number of significant digits to write.
SourceGet the minimum number of significant digits to write.
SourceGet the maximum exponent prior to using scientific notation.
SourceGet the minimum exponent prior to using scientific notation.
SourceGet the rounding mode for writing digits with precision control.
SourceGet if we should trim a trailing ".0"
from floats.
Get the character to designate the exponent component of a float.
SourceGet the character to separate the integer from the fraction components.
SourceGet the string representation for NaN
.
Get the short string representation for Infinity
.
Set the maximum number of significant digits to write.
SourceSet the minimum number of significant digits to write.
SourceSet the maximum exponent prior to using scientific notation.
SourceSet the minimum exponent prior to using scientific notation.
SourceSet the rounding mode for writing digits with precision control.
SourceSet if we should trim a trailing ".0"
from floats.
Set the character to designate the exponent component of a float.
§SafetyAlways safe, but may produce invalid output if the exponent is not a valid ASCII character.
SourceSet the character to separate the integer from the fraction components.
§SafetyAlways safe, but may produce invalid output if the decimal point is not a valid ASCII character.
SourceSet the string representation for NaN
.
Panics
Setting a value too large may cause a panic even if FORMATTED_SIZE
elements are provided.
Set the short string representation for Infinity
Panics
Setting a value too large may cause a panic even if FORMATTED_SIZE
elements are provided.
Get WriteFloatOptionsBuilder
as a static function.
Create OptionsBuilder
using existing values.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4