devicemapper/
consts.rs

1// This Source Code Form is subject to the terms of the Mozilla Public
2// License, v. 2.0. If a copy of the MPL was not distributed with this
3// file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5#[allow(non_upper_case_globals)]
6#[allow(non_snake_case)]
7/// International Electrotechnical Commission Units Standards
8pub mod IEC {
9    /// kibi
10    pub const Ki: u64 = 1024;
11    /// mebi
12    pub const Mi: u64 = 1024 * Ki;
13    /// gibi
14    pub const Gi: u64 = 1024 * Mi;
15    /// tebi
16    pub const Ti: u64 = 1024 * Gi;
17    /// pebi
18    pub const Pi: u64 = 1024 * Ti;
19    /// exbi
20    pub const Ei: u64 = 1024 * Pi;
21    // Ei is the maximum IEC unit expressible in u64.
22}