forked from extern/nushell
d66a5398d1
remove month/year/decade durations for parsing and units, but leave the humanized output for viewing
34 lines
525 B
Rust
34 lines
525 B
Rust
use serde::{Deserialize, Serialize};
|
|
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize, Deserialize)]
|
|
pub enum Unit {
|
|
// Filesize units: metric
|
|
Byte,
|
|
Kilobyte,
|
|
Megabyte,
|
|
Gigabyte,
|
|
Terabyte,
|
|
Petabyte,
|
|
Exabyte,
|
|
Zettabyte,
|
|
|
|
// Filesize units: ISO/IEC 80000
|
|
Kibibyte,
|
|
Mebibyte,
|
|
Gibibyte,
|
|
Tebibyte,
|
|
Pebibyte,
|
|
Exbibyte,
|
|
Zebibyte,
|
|
|
|
// Duration units
|
|
Nanosecond,
|
|
Microsecond,
|
|
Millisecond,
|
|
Second,
|
|
Minute,
|
|
Hour,
|
|
Day,
|
|
Week,
|
|
}
|