Trait lexical_core::FormattedSize
source · pub trait FormattedSize {
const FORMATTED_SIZE: usize;
const FORMATTED_SIZE_DECIMAL: usize;
}
Expand description
The size, in bytes, of formatted values.
Required Associated Constants§
sourceconst FORMATTED_SIZE: usize
const FORMATTED_SIZE: usize
Maximum number of bytes required to serialize a number to string.
Note that this value may be insufficient if digit precision control,
exponent break points, or disabling exponent notation is used. If
you are changing the number significant digits written, the exponent
break points, or disabling scientific notation, you will need a larger
buffer than the one provided. An upper limit on the buffer size can
then be determined using WriteOptions::buffer_size
.
sourceconst FORMATTED_SIZE_DECIMAL: usize
const FORMATTED_SIZE_DECIMAL: usize
Maximum number of bytes required to serialize a number to a decimal string.
Note that this value may be insufficient if digit precision control,
exponent break points, or disabling exponent notation is used. If
you are changing the number significant digits written, the exponent
break points, or disabling scientific notation, you will need a larger
buffer than the one provided. An upper limit on the buffer size can
then be determined using WriteOptions::buffer_size
.