pub struct MemoryClass {
pub label: &'static str,
pub bytes: u64,
pub counts_as_used: bool,
pub counts_as_cache: bool,
pub counts_as_total: bool,
pub color_slot: u8,
}Expand description
One named class of memory, as htop models it.
counts_as_used adds it to the “used” figure; counts_as_cache marks it as
reclaimable. Modeling this as data (which is what htop 3.6 does in
MemoryClass[]) keeps the formula reviewable instead of hiding it in
arithmetic.
Fields§
§label: &'static str§bytes: u64§counts_as_used: bool§counts_as_cache: bool§counts_as_total: bool§color_slot: u8Color slot, 0-5, matching htop’s MEMORY_1..6 palette order.
Trait Implementations§
Source§impl Clone for MemoryClass
impl Clone for MemoryClass
impl Copy for MemoryClass
Auto Trait Implementations§
impl Freeze for MemoryClass
impl RefUnwindSafe for MemoryClass
impl Send for MemoryClass
impl Sync for MemoryClass
impl Unpin for MemoryClass
impl UnsafeUnpin for MemoryClass
impl UnwindSafe for MemoryClass
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more