Skip to main content

FormatSize

Trait FormatSize 

Source
pub trait FormatSize {
    // Required method
    fn format_size(self) -> FormattedSize;
}
Expand description

This trait adds format_size method to primitive u64 and usize types.

Required Methods§

Source

fn format_size(self) -> FormattedSize

Splits the original size into integral, fractional and adds a unit.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl FormatSize for u64

Source§

impl FormatSize for usize

Implementors§