Trait libreda_db::hierarchy::util::HierarchyUtil
source · pub trait HierarchyUtil: HierarchyBase {
// Provided methods
fn is_top_level_cell(&self, cell: &Self::CellId) -> bool { ... }
fn is_leaf_cell(&self, cell: &Self::CellId) -> bool { ... }
fn each_top_level_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_> { ... }
fn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_> { ... }
fn each_cell_bottom_to_top(
&self,
) -> Box<dyn Iterator<Item = Self::CellId> + '_> { ... }
}
Expand description
Non-modifying utility functions for the cell hierarchy..
Import the this trait to use the utility functions all types that implement the HierarchyBase
trait.
Provided Methods§
sourcefn is_top_level_cell(&self, cell: &Self::CellId) -> bool
fn is_top_level_cell(&self, cell: &Self::CellId) -> bool
Check if the cell is a top level cell. This is done by checking that no other cells have an instance of this cell.
sourcefn is_leaf_cell(&self, cell: &Self::CellId) -> bool
fn is_leaf_cell(&self, cell: &Self::CellId) -> bool
Check if the cell is a leaf cell. This is done by checking that this cell contains no other cell instances.
sourcefn each_top_level_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_top_level_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over all top level cells.
sourcefn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_leaf_cell(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over all leaf cells, i.e. cells which contain no other cells.
sourcefn each_cell_bottom_to_top(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
fn each_cell_bottom_to_top(&self) -> Box<dyn Iterator<Item = Self::CellId> + '_>
Iterate over topologically sorted cells (from leaf-cells to top-cells).
Object Safety§
This trait is not object safe.