Struct lexical_write_float::Options [−][src]
pub struct Options { /* fields omitted */ }
Expand description
Options to customize writing floats.
Examples
use lexical_write_float::Options;
let options = Options::builder()
.trim_floats(true)
.nan_string(Some(b"NaN"))
.inf_string(Some(b"Inf"))
.build()
.unwrap();
Implementations
Get the maximum number of significant digits to write.
Get the minimum number of significant digits to write.
Get the maximum exponent prior to using scientific notation.
Get the minimum exponent prior to using scientific notation.
Get the rounding mode for writing digits with precision control.
Get if we should trim a trailing ".0"
from floats.
Get the character to designate the exponent component of a float.
Get the character to separate the integer from the fraction components.
Get the string representation for NaN
.
Get the short string representation for Infinity
.
Set the maximum number of significant digits to write. Unsafe, use the builder API for option validation.
Safety
Always safe, just marked as unsafe for API compatibility.
Set the minimum number of significant digits to write. Unsafe, use the builder API for option validation.
Safety
Always safe, just marked as unsafe for API compatibility.
Set the maximum exponent prior to using scientific notation.
Safety
Always safe, just marked as unsafe for API compatibility.
Set the minimum exponent prior to using scientific notation.
Safety
Always safe, just marked as unsafe for API compatibility.
Set the rounding mode for writing digits with precision control.
Safety
Always safe, just marked as unsafe for API compatibility.
Set if we should trim a trailing ".0"
from floats.
Unsafe, use the builder API for option validation.
Safety
Always safe, just marked as unsafe for API compatibility.
Set the character to designate the exponent component of a float.
Safety
Always safe, but may produce invalid output if the exponent is not a valid ASCII character.
Set the character to separate the integer from the fraction components.
Safety
Always safe, but may produce invalid output if the decimal point is not a valid ASCII character.
Set the string representation for NaN
.
Unsafe, use the builder API for option validation.
Safety
Unsafe if nan_string.len() > MAX_SPECIAL_STRING_LENGTH
. This might
cause a special string larger than the buffer length to be written,
causing a buffer overflow, potentially a severe security vulnerability.
Set the short string representation for Infinity
Unsafe, use the builder API for option validation.
Safety
Unsafe if nan_string.len() > MAX_SPECIAL_STRING_LENGTH
. This might
cause a special string larger than the buffer length to be written,
causing a buffer overflow, potentially a severe security vulnerability.
Get WriteFloatOptionsBuilder as a static function.
Create OptionsBuilder using existing values.
Trait Implementations
Get an upper bound on the buffer size.
Auto Trait Implementations
impl RefUnwindSafe for Options
impl UnwindSafe for Options
Blanket Implementations
Mutably borrows from an owned value. Read more