Struct below_model::cgroup::CgroupModel
source · [−]pub struct CgroupModel {
pub data: SingleCgroupModel,
pub children: BTreeSet<CgroupModel>,
pub count: u32,
pub recreate_flag: bool,
}
Expand description
A model that represents a cgroup subtree. Each instance is a node that uses the “data” field to represent local data. Otherwise mixing hierarchy and data makes it hard to define a Field Id type that queries nested cgroups.
Fields
data: SingleCgroupModel
children: BTreeSet<CgroupModel>
count: u32
Total number of cgroups under this subtree, including self
recreate_flag: bool
Indicate if such cgroup is created
Implementations
sourceimpl CgroupModel
impl CgroupModel
pub fn new(
name: String,
full_path: String,
depth: u32,
sample: &CgroupSample,
last: Option<(&CgroupSample, Duration)>
) -> CgroupModel
pub fn aggr_top_level_val(self) -> Self
Trait Implementations
sourceimpl Borrow<String> for CgroupModel
impl Borrow<String> for CgroupModel
sourceimpl Clone for CgroupModel
impl Clone for CgroupModel
sourcefn clone(&self) -> CgroupModel
fn clone(&self) -> CgroupModel
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for CgroupModel
impl Debug for CgroupModel
sourceimpl Default for CgroupModel
impl Default for CgroupModel
sourcefn default() -> CgroupModel
fn default() -> CgroupModel
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for CgroupModel
impl<'de> Deserialize<'de> for CgroupModel
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Ord for CgroupModel
impl Ord for CgroupModel
1.21.0 · sourcefn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: Sized + PartialOrd<Self>,
Restrict a value to a certain interval. Read more
sourceimpl PartialEq<CgroupModel> for CgroupModel
impl PartialEq<CgroupModel> for CgroupModel
sourceimpl PartialOrd<CgroupModel> for CgroupModel
impl PartialOrd<CgroupModel> for CgroupModel
sourcefn partial_cmp(&self, other: &Self) -> Option<Ordering>
fn partial_cmp(&self, other: &Self) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresourceimpl Queriable for CgroupModel
impl Queriable for CgroupModel
sourceimpl Serialize for CgroupModel
impl Serialize for CgroupModel
impl Eq for CgroupModel
Auto Trait Implementations
impl RefUnwindSafe for CgroupModel
impl Send for CgroupModel
impl Sync for CgroupModel
impl Unpin for CgroupModel
impl UnwindSafe for CgroupModel
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more