Trait zng_unit::ByteUnits

source ·
pub trait ByteUnits {
    // Required methods
    fn bytes(self) -> ByteLength;
    fn kibibytes(self) -> ByteLength;
    fn kilobytes(self) -> ByteLength;
    fn mebibytes(self) -> ByteLength;
    fn megabytes(self) -> ByteLength;
    fn gibibytes(self) -> ByteLength;
    fn gigabytes(self) -> ByteLength;
    fn tebibytes(self) -> ByteLength;
    fn terabytes(self) -> ByteLength;
}
Expand description

Extension methods for initializing ByteLength values.

Required Methods§

source

fn bytes(self) -> ByteLength

Bytes.

See ByteLength for more details.

source

fn kibibytes(self) -> ByteLength

Kibi-bytes.

See ByteLength::from_kibi for more details.

source

fn kilobytes(self) -> ByteLength

Kilo-bytes.

See ByteLength::from_kilo for more details.

source

fn mebibytes(self) -> ByteLength

Mebi-bytes.

See ByteLength::from_mebi for more details.

source

fn megabytes(self) -> ByteLength

Mega-bytes.

See ByteLength::from_mega for more details.

source

fn gibibytes(self) -> ByteLength

Gibi-bytes.

See ByteLength::from_gibi for more details.

source

fn gigabytes(self) -> ByteLength

Giga-bytes.

See ByteLength::from_giga for more details.

source

fn tebibytes(self) -> ByteLength

Tebi-bytes.

See ByteLength::from_tebi for more details.

source

fn terabytes(self) -> ByteLength

Tera-bytes.

See ByteLength::from_tera for more details.

Implementations on Foreign Types§

source§

impl ByteUnits for usize

Implementors§