pub struct FixedParts<'a> {
pub negative: bool,
pub whole: &'a str,
pub fraction: &'a str,
}Expand description
A fixed<P, S> value split into its parts, with every rule about what is
a legal value for that declaration already applied.
The digits come back trimmed of the leading zeros the declaration would
pad back on, because that is what both callers need and neither can
recover once they are gone: Writer::write_fixed counts them to answer
FixedDigits::ValuePrecision, and zerodds-wire-codec’s canonical form
writes them out as the one spelling a sample has.
Fields§
§negative: boolWhether the value carries a -. A negative zero is still true here:
Writer::write_fixed gives it the positive sign nibble because
§9.3.2.8 has one zero, but that is the packing’s rule and not the
parse’s, and the canonical form has to make the same decision itself.
whole: &'a strThe integer digits, leading zeros removed. Empty for a value below one.
fraction: &'a strThe fraction digits as written, never more than S and possibly fewer.