pub struct ByteSizeHelper;Expand description
Formats a size in bytes as text with a decimal unit prefix (1.5 KB).
Implementations§
Source§impl ByteSizeHelper
impl ByteSizeHelper
Sourcepub fn to_string(bytes: u64, separate: bool) -> String
pub fn to_string(bytes: u64, separate: bool) -> String
The text of bytes with the largest decimal unit that keeps the
number at least one, with at most one fractional digit, formatted
with the conventions of the current culture.
separate puts a space between the number and the unit; as in the
original, only a size of zero honours it.
Auto Trait Implementations§
impl Freeze for ByteSizeHelper
impl RefUnwindSafe for ByteSizeHelper
impl Send for ByteSizeHelper
impl Sync for ByteSizeHelper
impl Unpin for ByteSizeHelper
impl UnsafeUnpin for ByteSizeHelper
impl UnwindSafe for ByteSizeHelper
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
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
The static constructor of a type: work done once per thread, after
the properties of the type are registered and before its first
instance exists (class handlers,
affects_render, metadata
overrides). Read more