Trait libreda_db::layout::traits::RegionSearch

source ·
pub trait RegionSearch: LayoutBase {
    // Required methods
    fn each_shape_in_region_per_layer(
        &self,
        cell: &Self::CellId,
        layer_id: &Self::LayerId,
        search_region: &Rect<Self::Coord>,
    ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>;
    fn each_cell_instance_in_region(
        &self,
        cell: &Self::CellId,
        search_region: &Rect<Self::Coord>,
    ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>;

    // Provided method
    fn each_shape_in_region(
        &self,
        cell: &Self::CellId,
        search_region: &Rect<Self::Coord>,
    ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_> { ... }
}
Expand description

Access shapes and instances in a layout based on their locations.

Required Methods§

source

fn each_shape_in_region_per_layer( &self, cell: &Self::CellId, layer_id: &Self::LayerId, search_region: &Rect<Self::Coord>, ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>

Iterate over the IDs of all shapes (on a specific layer) whose bounding-box overlaps with the search_region.

source

fn each_cell_instance_in_region( &self, cell: &Self::CellId, search_region: &Rect<Self::Coord>, ) -> Box<dyn Iterator<Item = Self::CellInstId> + '_>

Iterate over the IDs of all instances within the cell whose bounding-box overlaps with the search_region.

Provided Methods§

source

fn each_shape_in_region( &self, cell: &Self::CellId, search_region: &Rect<Self::Coord>, ) -> Box<dyn Iterator<Item = Self::ShapeId> + '_>

Iterate over the IDs of all shapes (on all layers) whose bounding-box overlaps with the search_region.

Object Safety§

This trait is not object safe.

Implementors§