pub struct Bytes(/* private fields */);Implementations§
Trait Implementations§
impl Copy for Bytes
impl Eq for Bytes
Source§impl FromStr for Bytes
use liboj_cgroups::subsystem::memory::Bytes;
const K: usize = 1024;
const M: usize = 1048576;
const G: usize = 1073741824;
assert_eq!(Bytes::from_bytes(K), "1k".parse().unwrap());
assert_eq!(Bytes::from_bytes(K), "1K".parse().unwrap());
assert_eq!(Bytes::from_bytes(M), "1m".parse().unwrap());
assert_eq!(Bytes::from_bytes(M), "1M".parse().unwrap());
assert_eq!(Bytes::from_bytes(G), "1g".parse().unwrap());
assert_eq!(Bytes::from_bytes(G), "1G".parse().unwrap());
assert_eq!(Bytes::infinity(), "-1".parse().unwrap());
impl FromStr for Bytes
use liboj_cgroups::subsystem::memory::Bytes;
const K: usize = 1024;
const M: usize = 1048576;
const G: usize = 1073741824;
assert_eq!(Bytes::from_bytes(K), "1k".parse().unwrap());
assert_eq!(Bytes::from_bytes(K), "1K".parse().unwrap());
assert_eq!(Bytes::from_bytes(M), "1m".parse().unwrap());
assert_eq!(Bytes::from_bytes(M), "1M".parse().unwrap());
assert_eq!(Bytes::from_bytes(G), "1g".parse().unwrap());
assert_eq!(Bytes::from_bytes(G), "1G".parse().unwrap());
assert_eq!(Bytes::infinity(), "-1".parse().unwrap());impl StructuralPartialEq for Bytes
Auto Trait Implementations§
impl Freeze for Bytes
impl RefUnwindSafe for Bytes
impl Send for Bytes
impl Sync for Bytes
impl Unpin for Bytes
impl UnsafeUnpin for Bytes
impl UnwindSafe for Bytes
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