fn u64_to_mob_display(val: u64) -> String {
    let mut decimal_val: Decimal = val.into();

    let kilo_mob = Decimal::from_scientific("1000e12").unwrap();
    let mob = Decimal::from_scientific("1e12").unwrap();
    let micro_mob = Decimal::from_scientific("1e6").unwrap();

    if val == 0 {
        "0 MOB".to_owned()
    } else if decimal_val >= kilo_mob {
        decimal_val /= kilo_mob;
        format!("{:.3} kMOB", decimal_val)
    } else if decimal_val >= mob {
        decimal_val /= mob;
        format!("{:.3} MOB", decimal_val)
    } else if decimal_val >= micro_mob {
        decimal_val /= micro_mob;
        format!("{:.3} µMOB", decimal_val)
    } else {
        format!("{} pMOB", decimal_val)
    }
}
/// Helper method for converting a u64 picomob value into human-readable form.
Helper method for converting a u64 picomob value into human-readable form.
Helper method for converting a u64 picomob value into human - readable form .
fn u64_to_mob_display(val: u64) -> String {
    let mut decimal_val: Decimal = val.into();
    let kilo_mob = Decimal::from_scientific("1000e12").unwrap();
    let mob = Decimal::from_scientific("1e12").unwrap();
    let micro_mob = Decimal::from_scientific("1e6").unwrap();
    if val == 0 {
        "0 MOB".to_owned()
    } else if decimal_val >= kilo_mob {
        decimal_val /= kilo_mob;
        format!("{:.3} kMOB", decimal_val)
    } else if decimal_val >= mob {
        decimal_val /= mob;
        format!("{:.3} MOB", decimal_val)
    } else if decimal_val >= micro_mob {
        decimal_val /= micro_mob;
        format!("{:.3} µMOB", decimal_val)
    } else {
        format!("{} pMOB", decimal_val)
    }
}
fn u64_to_mob_display ( val : u64 ) -> String { let mut decimal_val : Decimal = val . into ( ) ; let kilo_mob = Decimal :: from_scientific ( " " ) . unwrap ( ) ; let mob = Decimal :: from_scientific ( " " ) . unwrap ( ) ; let micro_mob = Decimal :: from_scientific ( " " ) . unwrap ( ) ; if val == 0 { " " . to_owned ( ) } else if decimal_val >= kilo_mob { decimal_val /= kilo_mob ; format ! ( " " decimal_val ) } else if decimal_val >= mob { decimal_val /= mob ; format ! ( " " decimal_val ) } else if decimal_val >= micro_mob { decimal_val /= micro_mob ; format ! ( " , ecimal_val) } else { format ! ( " " decimal_val ) } }
Helper method for converting a u64 picomob value into human-readable form.
Helper method for converting a u64 picomob value into human - readable form .
val
u64
val
u64