Debian Codegraph @

src/utils/data_units.rs

raw symbols SCIP
1 #[deriverust-analyzer cargo core https://github.com/rust-lang/rust/library/core macros/builtin/derive:(Debugrust-analyzer cargo core https://github.com/rust-lang/rust/library/core fmt/macros/Debug:, Clonerust-analyzer cargo core https://github.com/rust-lang/rust/library/core clone/Clone:, Copyrust-analyzer cargo core https://github.com/rust-lang/rust/library/core marker/Copy:, Eqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/Eq:, PartialEqrust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/PartialEq:, Defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/Default:)]
2 pub enum DataUnitrust-analyzer cargo bottom 0.14.9 utils/data_units/DataUnit# {
3 Byterust-analyzer cargo bottom 0.14.9 utils/data_units/DataUnit#Byte#,
4 #[defaultrust-analyzer cargo core https://github.com/rust-lang/rust/library/core default/default:]
5 Bitrust-analyzer cargo bottom 0.14.9 utils/data_units/DataUnit#Bit#,
6 }
7
8 pub const KILO_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT.: u64 = 1000;
9 pub const MEGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT.: u64 = 1_000_000;
10 pub const GIGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT.: u64 = 1_000_000_000;
11 pub const TERA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT.: u64 = 1_000_000_000_000;
12 pub const KIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT.: u64 = 1024;
13 pub const MEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT.: u64 = 1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024;
14 pub const GIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT.: u64 = 1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024;
15 pub const TEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT.: u64 = 1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Mul<Self>`]mul().1024;
16
17 pub const KILO_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT_F64.: f64 = 1000.0;
18 pub const MEGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT_F64.: f64 = 1_000_000.0;
19 pub const GIGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT_F64.: f64 = 1_000_000_000.0;
20 pub const TERA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT_F64.: f64 = 1_000_000_000_000.0;
21 pub const KIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT_F64.: f64 = 1024.0;
22 pub const MEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT_F64.: f64 = 1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0;
23 pub const GIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT_F64.: f64 = 1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0;
24 pub const TEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT_F64.: f64 = 1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().*rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Mul<Self>`]mul().1024.0;
25
26 pub const LOG_MEGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_MEGA_LIMIT.: f64 = 6.0;
27 pub const LOG_GIGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_GIGA_LIMIT.: f64 = 9.0;
28 pub const LOG_TERA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_TERA_LIMIT.: f64 = 12.0;
29 pub const LOG_PETA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_PETA_LIMIT.: f64 = 15.0;
30
31 pub const LOG_MEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_MEBI_LIMIT.: f64 = 20.0;
32 pub const LOG_GIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_GIBI_LIMIT.: f64 = 30.0;
33 pub const LOG_TEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_TEBI_LIMIT.: f64 = 40.0;
34 pub const LOG_PEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/LOG_PEBI_LIMIT.: f64 = 50.0;
35
36 /// Returns a tuple containing the value and the unit in bytes. In units of
37 /// 1024. This only supports up to a tebi. Note the "single" unit will have a
38 /// space appended to match the others if `spacing` is true.
39 #[inline]
40 pub fn get_binary_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/get_binary_bytes().(bytes: u64) -> (f64, &'static str) {
41 match bytes {
42 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().KIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT. => (bytes as f64, "B"),
43 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().MEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().KIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT_F64., "KiB"),
44 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().GIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().MEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT_F64., "MiB"),
45 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().TEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().GIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT_F64., "GiB"),
46 _ => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().TEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT_F64., "TiB"),
47 }
48 }
49
50 /// Returns a tuple containing the value and the unit in bytes. In units of
51 /// 1000. This only supports up to a tera. Note the "single" unit will have a
52 /// space appended to match the others if `spacing` is true.
53 #[inline]
54 pub fn get_decimal_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/get_decimal_bytes().(bytes: u64) -> (f64, &'static str) {
55 match bytes {
56 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().KILO_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT. => (bytes as f64, "B"),
57 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().MEGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().KILO_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT_F64., "KB"),
58 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().GIGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().MEGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT_F64., "MB"),
59 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().TERA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT. => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().GIGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT_F64., "GB"),
60 _ => (bytes as f64 rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().TERA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT_F64., "TB"),
61 }
62 }
63
64 /// Given a value in _bits_, turn a tuple containing the value and a unit.
65 #[inline]
66 pub fn convert_bitsrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bits().(bits: u64, base_two: bool) -> (f64, &'static str) {
67 convert_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bytes().(bits rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[u64][`Div<Self>`]div().8, base_two)
68 }
69
70 /// Given a value in _bytes_, turn a tuple containing the value and a unit.
71 #[inline]
72 pub fn convert_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/convert_bytes().(bytes: u64, base_two: bool) -> (f64, &'static str) {
73 if base_two {
74 get_binary_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/get_binary_bytes().(bytes)
75 } else {
76 get_decimal_bytesrust-analyzer cargo bottom 0.14.9 utils/data_units/get_decimal_bytes().(bytes)
77 }
78 }
79
80 /// Return a tuple containing the value and a unit string to be used as a
81 /// prefix.
82 #[inline]
83 pub fn get_unit_prefixrust-analyzer cargo bottom 0.14.9 utils/data_units/get_unit_prefix().(value: u64, base_two: bool) -> (f64, &'static str) {
84 let float_value = value as f64;
85
86 if base_two {
87 match value {
88 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().KIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT. => (float_value, ""),
89 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().MEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().KIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KIBI_LIMIT_F64., "Ki"),
90 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().GIBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().MEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEBI_LIMIT_F64., "Mi"),
91 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().TEBI_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().GIBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIBI_LIMIT_F64., "Gi"),
92 _ => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().TEBI_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TEBI_LIMIT_F64., "Ti"),
93 }
94 } else {
95 match value {
96 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().KILO_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT. => (float_value, ""),
97 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().MEGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().KILO_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/KILO_LIMIT_F64., "K"),
98 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().GIGA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().MEGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/MEGA_LIMIT_F64., "M"),
99 b if b rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().<rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core cmp/impls/impl#[u64][`PartialOrd<Self>`]lt().TERA_LIMITrust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT. => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().GIGA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/GIGA_LIMIT_F64., "G"),
100 _ => (float_value rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div()./rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div(). rust-analyzer cargo core https://github.com/rust-lang/rust/library/core ops/arith/impl#[f64][`Div<Self>`]div().TERA_LIMIT_F64rust-analyzer cargo bottom 0.14.9 utils/data_units/TERA_LIMIT_F64., "T"),
101 }
102 }
103 }