pub struct MemoryCapacity {
pub physical_bytes: Option<u64>,
pub available_bytes: Option<u64>,
pub limit_bytes: Option<u64>,
pub limit_source: &'static str,
pub used_in_limit_bytes: Option<u64>,
}Expand description
The machine’s memory and this process’s limit. Unavailable figures are None.
Fields§
§physical_bytes: Option<u64>Physical memory installed.
available_bytes: Option<u64>Memory available without paging: MemAvailable on Linux, free plus inactive plus
purgeable pages on macOS, ullAvailPhys on Windows.
limit_bytes: Option<u64>The lowest of a cgroup or job limit and the physical total.
limit_source: &'static strWhat set limit_bytes: cgroup-v2, cgroup-v1, job or physical.
used_in_limit_bytes: Option<u64>Usage charged against a cgroup limit; None for physical and job limits.
Implementations§
Trait Implementations§
Source§impl Clone for MemoryCapacity
impl Clone for MemoryCapacity
impl Copy for MemoryCapacity
Source§impl Debug for MemoryCapacity
impl Debug for MemoryCapacity
Source§impl Default for MemoryCapacity
impl Default for MemoryCapacity
impl Eq for MemoryCapacity
Source§impl PartialEq for MemoryCapacity
impl PartialEq for MemoryCapacity
impl StructuralPartialEq for MemoryCapacity
Auto Trait Implementations§
impl Freeze for MemoryCapacity
impl RefUnwindSafe for MemoryCapacity
impl Send for MemoryCapacity
impl Sync for MemoryCapacity
impl Unpin for MemoryCapacity
impl UnsafeUnpin for MemoryCapacity
impl UnwindSafe for MemoryCapacity
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