Skip to main content

CgroupState

Struct CgroupState 

Source
pub struct CgroupState {
    pub collapsed_cgroups: Rc<RefCell<HashSet<String>>>,
    pub current_selected_cgroup: String,
    pub cgroup_to_focus: Option<String>,
    pub filter_info: Option<(SingleCgroupModelFieldId, String)>,
    pub sort_order: Option<SingleCgroupModelFieldId>,
    pub sort_tags: HashMap<String, Vec<ViewItem<SingleCgroupModelFieldId>>>,
    pub reverse: bool,
    pub model: Rc<RefCell<CgroupModel>>,
    pub collapse_all_top_level_cgroup: bool,
}

Fields§

§collapsed_cgroups: Rc<RefCell<HashSet<String>>>§current_selected_cgroup: String§cgroup_to_focus: Option<String>§filter_info: Option<(SingleCgroupModelFieldId, String)>§sort_order: Option<SingleCgroupModelFieldId>§sort_tags: HashMap<String, Vec<ViewItem<SingleCgroupModelFieldId>>>§reverse: bool§model: Rc<RefCell<CgroupModel>>§collapse_all_top_level_cgroup: bool

Implementations§

Trait Implementations§

Source§

impl Default for CgroupState

Source§

fn default() -> CgroupState

Returns the “default value” for a type. Read more
Source§

impl StateCommon for CgroupState

Source§

type ModelType = CgroupModel

Source§

type TagType = SingleCgroupModelFieldId

Source§

type KeyType = String

Source§

fn get_filter_info(&self) -> &Option<(Self::TagType, String)>

Expose filter data for StatsView to set fields in filter popup
Source§

fn is_filter_supported_from_tab_idx(&self, _tab: &str, idx: usize) -> bool

Returns true iff filtering is supported for column
Source§

fn get_tag_from_tab_idx(&self, tab: &str, idx: usize) -> Self::TagType

Gets the FieldId associated with given tab and column index
Source§

fn set_filter_from_tab_idx( &mut self, tab: &str, idx: usize, filter: Option<String>, ) -> bool

Set the filter (current column and filter string) Return true on success, false on failure
Source§

fn set_sort_tag( &mut self, sort_order: Self::TagType, reverse: &mut bool, ) -> bool

Set the sorting tag to common state Return true on success, false if current tab doest support sorting.
Source§

fn set_sort_tag_from_tab_idx( &mut self, tab: &str, idx: usize, reverse: &mut bool, ) -> bool

Source§

fn set_sort_string(&mut self, selection: &str, reverse: &mut bool) -> bool

Source§

fn get_model(&self) -> Ref<'_, Self::ModelType>

Source§

fn get_model_mut(&self) -> RefMut<'_, Self::ModelType>

Source§

fn new(model: Rc<RefCell<Self::ModelType>>) -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> Erased for T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> With for T

Source§

fn wrap_with<U, F>(self, f: F) -> U
where F: FnOnce(Self) -> U,

Calls the given closure and return the result. Read more
Source§

fn with<F>(self, f: F) -> Self
where F: FnOnce(&mut Self),

Calls the given closure on self.
Source§

fn try_with<E, F>(self, f: F) -> Result<Self, E>
where F: FnOnce(&mut Self) -> Result<(), E>,

Calls the given closure on self.
Source§

fn with_if<F>(self, condition: bool, f: F) -> Self
where F: FnOnce(&mut Self),

Calls the given closure if condition == true.