Trait 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.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§