pub struct EntityView {
pub id: String,
pub kind: GroupKind,
pub name: String,
pub aliases: Vec<String>,
pub owner: Option<String>,
pub mem: Option<u64>,
pub gpu: Option<u64>,
pub cpu: Option<f64>,
pub idle_s: Option<u64>,
pub state: Vec<String>,
pub sandbox: Option<String>,
}Expand description
Flattened view of an entity for filter evaluation.
Fields§
§id: String§kind: GroupKind§name: String§aliases: Vec<String>§owner: Option<String>§mem: Option<u64>§gpu: Option<u64>§cpu: Option<f64>§idle_s: Option<u64>§state: Vec<String>Flags such as “idle”, “orphan”, “muted”, “pinned”, “protected”, “reclaimable”, “busy”, “self”,
“partial” (footprint is a lower bound), and runtime:<name> for sandboxes.
sandbox: Option<String>Implementations§
Source§impl EntityView
impl EntityView
pub fn from_group(g: &Group, s: &Snapshot) -> Self
Sourcepub fn time_value(&self, m: TimeMetric) -> Option<f64>
pub fn time_value(&self, m: TimeMetric) -> Option<f64>
Value of a time metric, carried as a time:<key>=<value> entry in state (like the sandbox
runtime; this keeps EntityView’s fields unchanged for frontends that build views by hand). None
when unknown: comparisons then never match.
Sourcepub fn set_time_value(&mut self, m: TimeMetric, v: Option<f64>)
pub fn set_time_value(&mut self, m: TimeMetric, v: Option<f64>)
Sets (or clears, with None) a time metric value (process views built by hand).
Sourcepub fn sandbox_runtime(&self) -> Option<&str>
pub fn sandbox_runtime(&self) -> Option<&str>
Sandbox runtime carried as a runtime:<name> flag, if any.
Trait Implementations§
Source§impl Clone for EntityView
impl Clone for EntityView
Source§impl Debug for EntityView
impl Debug for EntityView
Source§impl Default for EntityView
impl Default for EntityView
Source§impl PartialEq for EntityView
impl PartialEq for EntityView
impl StructuralPartialEq for EntityView
Auto Trait Implementations§
impl Forget for EntityView
impl Freeze for EntityView
impl Move for EntityView
impl RefUnwindSafe for EntityView
impl Send for EntityViewwhere
RawVecInner: Send,
impl Sync for EntityViewwhere
RawVecInner: Sync,
impl Unpin for EntityView
impl UnsafeUnpin for EntityViewwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
impl UnwindSafe for EntityViewwhere
RawVecInner: UnwindSafe,
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