Struct core::num::flt2dec::Formatted
[−]
[src]
pub struct Formatted<'a> { pub sign: &'static [u8], pub parts: &'a [Part<'a>], }
Unstable (
flt2dec
): internal routines only exposed for testing
Formatted result containing one or more parts. This can be written to the byte buffer or converted to the allocated string.
Fields
sign | Unstable ( flt2dec ): internal routines only exposed for testing A byte slice representing a sign, either |
parts | Unstable ( flt2dec ): internal routines only exposed for testing Formatted parts to be rendered after a sign and optional zero padding. |
Methods
impl<'a> Formatted<'a>
fn len(&self) -> usize
Unstable (
flt2dec
): internal routines only exposed for testing
Returns the exact byte length of combined formatted result.
fn write(&self, out: &mut [u8]) -> Option<usize>
Unstable (
flt2dec
): internal routines only exposed for testing
Writes all formatted parts into the supplied buffer.
Returns the number of written bytes, or None
if the buffer is not enough.
(It may still leave partially written bytes in the buffer; do not rely on that.)