Skip to main content

replace_instances

Function replace_instances 

Source
pub fn replace_instances<F: Fn(CellId) -> bool>(
    lib: &Library,
    cell: CellId,
    predicate: F,
    replacement: CellId,
) -> CellBuilder
Expand description

Rewrite instances of cells matching predicate to point at replacement. The predicate is called with the original instance’s CellId and returns true to swap. Shapes are preserved.