Macro byte_unit::n_gib_bytes[][src]

macro_rules! n_gib_bytes {
    () => { ... };
    ($x : expr) => { ... };
    ($x : expr, $t : ty) => { ... };
}
Expand description

Convert n GiB to bytes.

Examples

extern crate byte_unit;

let result = byte_unit::n_gib_bytes!(4);

assert_eq!(4294967296, result);
extern crate byte_unit;

let result = byte_unit::n_gib_bytes!(2.5, f64);

assert_eq!(2684354560, result);