Struct lexical_core::WriteFloatOptionsBuilder [−][src]
pub struct WriteFloatOptionsBuilder { /* fields omitted */ }
Expand description
Builder for Options
.
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
.
pub const fn max_significant_digits(
self,
max_significant_digits: Option<NonZeroUsize>
) -> OptionsBuilder
pub const fn max_significant_digits(
self,
max_significant_digits: Option<NonZeroUsize>
) -> OptionsBuilder
Set the maximum number of significant digits to write.
pub const fn min_significant_digits(
self,
min_significant_digits: Option<NonZeroUsize>
) -> OptionsBuilder
pub const fn min_significant_digits(
self,
min_significant_digits: Option<NonZeroUsize>
) -> OptionsBuilder
Set the minimum number of significant digits to write.
pub const fn positive_exponent_break(
self,
positive_exponent_break: Option<NonZeroI32>
) -> OptionsBuilder
pub const fn positive_exponent_break(
self,
positive_exponent_break: Option<NonZeroI32>
) -> OptionsBuilder
Set the maximum exponent prior to using scientific notation.
pub const fn negative_exponent_break(
self,
negative_exponent_break: Option<NonZeroI32>
) -> OptionsBuilder
pub const fn negative_exponent_break(
self,
negative_exponent_break: Option<NonZeroI32>
) -> OptionsBuilder
Set the minimum exponent prior to using scientific notation.
Set the rounding mode for writing digits with precision control.
Set if we should trim a trailing ".0"
from floats.
Set the character to designate the exponent component of a float.
Set the character to separate the integer from the fraction components.
Set the string representation for NaN
.
Set the string representation for Infinity
.
Determine if nan_str
is valid.
Determine if inf_str
is valid.
Build the Options struct with bounds validation.
Safety
Safe as long as is_valid
is true. If nan_string
or inf_string
are too long, writing special floats may lead to buffer overflows,
and therefore severe security vulnerabilities.
Trait Implementations
Returns the “default value” for a type. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for OptionsBuilder
impl Send for OptionsBuilder
impl Sync for OptionsBuilder
impl Unpin for OptionsBuilder
impl UnwindSafe for OptionsBuilder
Blanket Implementations
Mutably borrows from an owned value. Read more