pub struct Kibibyte(/* private fields */);
Expand description
The structure for representing a specific number of kibibytes (1 kibibyte = 1024 bytes).
Trait Implementations§
Source§impl Add for Kibibyte
impl Add for Kibibyte
Source§impl Debug for Kibibyte
impl Debug for Kibibyte
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the represented kibibyte value using the given formatter in a programmer-facing, debugging context.
§Example
use memory_size_type::Kibibyte;
let one_kibibyte = Kibibyte::from(1);
let several_kibibytes = Kibibyte::from(256);
assert_eq!("1 kibibyte", format!("{}", one_kibibyte));
assert_eq!("256 kibibytes", format!("{}", several_kibibytes));
Source§impl Display for Kibibyte
impl Display for Kibibyte
Source§fn fmt(&self, f: &mut Formatter<'_>) -> Result
fn fmt(&self, f: &mut Formatter<'_>) -> Result
Formats the represented kibibyte value using the given formatter.
§Example
use memory_size_type::Kibibyte;
let one_kibibyte = Kibibyte::from(1);
let several_kibibytes = Kibibyte::from(256);
assert_eq!("1 kibibyte", format!("{}", one_kibibyte));
assert_eq!("256 kibibytes", format!("{}", several_kibibytes));
Auto Trait Implementations§
impl Freeze for Kibibyte
impl RefUnwindSafe for Kibibyte
impl Send for Kibibyte
impl Sync for Kibibyte
impl Unpin for Kibibyte
impl UnwindSafe for Kibibyte
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