Module humanize_rs::bytes [−][src]
This module is used to parse a string to byte size, supports units of 2^10 like "KiB", "MiB", or units of 1000 like "KB", "MB"
Example
use humanize_rs::bytes::{Bytes, Unit}; let gigabytes1 = Bytes::new(1, Unit::GiByte); let gigabytes2 = "1 GiB".parse::<Bytes>(); assert_eq!(gigabytes1, gigabytes2);
Structs
Bytes |
Size calculated in |
Enums
Unit |
Bytes units, like "KB", "KiB" |