pub struct NumericValue {
pub sign: Sign,
pub digits: String,
pub scale: u16,
}Expand description
Decoded numeric value extracted from an edited PIC field.
Contains the sign, raw digit string, and scale needed to produce a JSON numeric representation.
Fields§
§sign: SignSign of the number
digits: StringDigits without decimal point (e.g., “12345” for 123.45 with scale=2)
scale: u16Number of decimal places
Implementations§
Source§impl NumericValue
impl NumericValue
Sourcepub fn to_decimal_string(&self) -> String
pub fn to_decimal_string(&self) -> String
Format as decimal string for JSON output
Trait Implementations§
Source§impl Clone for NumericValue
impl Clone for NumericValue
Source§fn clone(&self) -> NumericValue
fn clone(&self) -> NumericValue
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NumericValue
impl Debug for NumericValue
Source§impl PartialEq for NumericValue
impl PartialEq for NumericValue
impl StructuralPartialEq for NumericValue
Auto Trait Implementations§
impl Freeze for NumericValue
impl RefUnwindSafe for NumericValue
impl Send for NumericValue
impl Sync for NumericValue
impl Unpin for NumericValue
impl UnsafeUnpin for NumericValue
impl UnwindSafe for NumericValue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more