pub struct ByteSize { /* private fields */ }Expand description
Bytes size data structure implementing methods to convert in various size orders The methods allow the convertion in the various size orders, both in base 1000 and base 1024
let byteSize = /* some sysutil function returning ByteSize */ ;
byteSize.b(); // bytes
byteSize.kb(); // 1000 bytes
byteSize.kib(); // 1024 bytes
byteSize.mb(); // 1.000.000 bytes
byteSize.mib(); // 1.048.576 bytes
byteSize.gb(); // 1.000.000.000 bytes
byteSize.gib(); //1.073.741.824 bytes
byteSize.tb(); // 1.000.000.000.000 bytes
byteSize.tib(); // 1.099.511.627.776 bytesImplementations§
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for ByteSize
impl Send for ByteSize
impl Sync for ByteSize
impl Unpin for ByteSize
impl UnwindSafe for ByteSize
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