Enum std::num::flt2dec::Part
[−]
[src]
pub enum Part<'a> { Zero(usize), Num(u16), Copy(&'a [u8]), }
Unstable (
flt2dec
): internal routines only exposed for testing
Formatted parts.
Variants
Zero | Unstable ( flt2dec ): internal routines only exposed for testing Given number of zero digits. |
Num | Unstable ( flt2dec ): internal routines only exposed for testing A literal number up to 5 digits. |
Copy | Unstable ( flt2dec ): internal routines only exposed for testing A verbatim copy of given bytes. |
Methods
impl<'a> Part<'a>
fn len(&self) -> usize
Unstable (
flt2dec
): internal routines only exposed for testing
Returns the exact byte length of given part.
fn write(&self, out: &mut [u8]) -> Option<usize>
Unstable (
flt2dec
): internal routines only exposed for testing
Writes a part 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.)