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§
source§impl 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§
source§impl Borrow<str> for CgroupModel
impl Borrow<str> for CgroupModel
source§impl Clone for CgroupModel
impl Clone for CgroupModel
source§fn clone(&self) -> CgroupModel
fn clone(&self) -> CgroupModel
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for CgroupModel
impl Debug for CgroupModel
source§impl Default for CgroupModel
impl Default for CgroupModel
source§fn default() -> CgroupModel
fn default() -> CgroupModel
Returns the “default value” for a type. Read more
source§impl<'de> Deserialize<'de> for CgroupModel
impl<'de> Deserialize<'de> for CgroupModel
source§fn 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
source§impl Nameable for CgroupModel
impl Nameable for CgroupModel
source§impl Ord for CgroupModel
impl Ord for CgroupModel
source§impl PartialEq<CgroupModel> for CgroupModel
impl PartialEq<CgroupModel> for CgroupModel
source§impl PartialOrd<CgroupModel> for CgroupModel
impl PartialOrd<CgroupModel> for CgroupModel
1.0.0 · source§fn 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 moresource§impl Queriable for CgroupModel
impl Queriable for CgroupModel
source§impl 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§
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