1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
/// A fixed-point integer, serialised as a particular string format. /// See k8s.io/apimachinery/pkg/api/resource/quantity.go use bigint::BigInt; pub struct Quantity { n: BigInt, format: Format, } enum Format { DecimalExponent, /// 12e6 BinarySI, /// 12Mi (12 * 2^20) DecimalSI, /// 12M (12 * 10^6) }