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
.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.