#[macro_export]
macro_rules! n_kb_bytes {
() => {
$crate::KILOBYTE
};
($x:expr) => {
$crate::n_kb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::_bytes_as!($x * ($crate::MEGABYTE as $t)) / $crate::KILOBYTE
};
}
#[macro_export]
macro_rules! n_kib_bytes {
() => {
$crate::KIBIBYTE
};
($x:expr) => {
$crate::n_kib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)) / $crate::KIBIBYTE
};
}
#[macro_export]
macro_rules! n_mb_bytes {
() => {
$crate::MEGABYTE
};
($x:expr) => {
$crate::n_mb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::_bytes_as!($x * ($crate::MEGABYTE as $t))
};
}
#[macro_export]
macro_rules! n_mib_bytes {
() => {
$crate::MEBIBYTE
};
($x:expr) => {
$crate::n_mib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::_bytes_as!($x * ($crate::MEBIBYTE as $t))
};
}
#[macro_export]
macro_rules! n_gb_bytes {
() => {
$crate::GIGABYTE
};
($x:expr) => {
$crate::n_gb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_kb_bytes($crate::_bytes_as!($x * ($crate::MEGABYTE as $t)))
};
}
#[macro_export]
macro_rules! n_gib_bytes {
() => {
$crate::GIBIBYTE
};
($x:expr) => {
$crate::n_gib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_kib_bytes($crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)))
};
}
#[macro_export]
macro_rules! n_tb_bytes {
() => {
$crate::TERABYTE
};
($x:expr) => {
$crate::n_tb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_mb_bytes($crate::_bytes_as!($x * ($crate::MEGABYTE as $t)))
};
}
#[macro_export]
macro_rules! n_tib_bytes {
() => {
$crate::TEBIBYTE
};
($x:expr) => {
$crate::n_tib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_mib_bytes($crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)))
};
}
#[macro_export]
macro_rules! n_pb_bytes {
() => {
$crate::PETABYTE
};
($x:expr) => {
$crate::n_pb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_gb_bytes($crate::_bytes_as!($x * ($crate::MEGABYTE as $t)))
};
}
#[macro_export]
macro_rules! n_pib_bytes {
() => {
$crate::PEBIBYTE
};
($x:expr) => {
$crate::n_pib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_gib_bytes($crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)))
};
}
#[cfg(feature = "u128")]
#[macro_export]
macro_rules! n_eb_bytes {
() => {
$crate::EXABYTE
};
($x:expr) => {
$crate::n_eb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_tb_bytes($crate::_bytes_as!($x * ($crate::MEGABYTE as $t)))
};
}
#[cfg(feature = "u128")]
#[macro_export]
macro_rules! n_eib_bytes {
() => {
$crate::EXBIBYTE
};
($x:expr) => {
$crate::n_eib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_tib_bytes($crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)))
};
}
#[cfg(feature = "u128")]
#[macro_export]
macro_rules! n_zb_bytes {
() => {
$crate::ZETTABYTE
};
($x:expr) => {
$crate::n_zb_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_pb_bytes($crate::_bytes_as!($x * ($crate::MEGABYTE as $t)))
};
}
#[cfg(feature = "u128")]
#[macro_export]
macro_rules! n_zib_bytes {
() => {
$crate::ZEBIBYTE
};
($x:expr) => {
$crate::n_zib_bytes($x)
};
($x:expr, $t:ty) => {
$crate::n_pib_bytes($crate::_bytes_as!($x * ($crate::MEBIBYTE as $t)))
};
}