pub struct ByteFmt(pub u64);Expand description
Formats a byte count using binary units (KiB, MiB, GiB).
The output keeps three decimals for larger units and rounds down (truncation), which is often preferable in diagnostics.
Examples:
ByteFmt(999)->"999 B"ByteFmt(1024)->"1.000 KiB"ByteFmt(1024*1024)->"1.000 MiB"
Tuple Fields§
§0: u64Trait Implementations§
Auto Trait Implementations§
impl Freeze for ByteFmt
impl RefUnwindSafe for ByteFmt
impl Send for ByteFmt
impl Sync for ByteFmt
impl Unpin for ByteFmt
impl UnsafeUnpin for ByteFmt
impl UnwindSafe for ByteFmt
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more