The Display trait currently implemented in ByteSize only supports decimal prefixes.
If we want to use a binary prefix, we need to use ByteSize::to_string_as.
I have added helper some struct and methods to use them to ByteSize to make these more intuitive with refer to std::path::Path.
The
Display
trait currently implemented inByteSize
only supports decimal prefixes. If we want to use a binary prefix, we need to useByteSize::to_string_as
. I have added helper some struct and methods to use them toByteSize
to make these more intuitive with refer tostd::path::Path
.If you like this PR, it would be my pleasure if you merge it!