pub struct WriteFloatOptionsBuilder { /* private fields */ }
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.

Set the maximum number of significant digits to write.

Set the minimum number of significant digits to write.

Set the maximum exponent prior to using scientific notation.

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.

Check if the builder state 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.

Build the Options struct.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

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

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.