#[non_exhaustive]pub struct Device {
pub total_memory: Option<u64>,
pub available_memory: Option<u64>,
pub cpus: usize,
}Expand description
The machine’s memory and CPUs, as the automatic budgets see them.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.total_memory: Option<u64>Physical memory (lowered to a cgroup v2 memory.max), when known.
available_memory: Option<u64>Memory available right now (available_memory), when known.
cpus: usizeCPUs this process may run on.
Implementations§
Trait Implementations§
impl Copy for Device
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Forget for Device
impl Freeze for Device
impl Move for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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