pub struct Library { /* private fields */ }Implementations§
Source§impl Library
impl Library
Sourcepub fn new(name: impl Into<SmolStr>, dbu: i64) -> Self
pub fn new(name: impl Into<SmolStr>, dbu: i64) -> Self
Create a new library. dbu is database units per micron (e.g. 1000
for a 1 nm grid). grid is the manufacturing grid in DBU; coordinates
not on this grid are rejected by the (future) grid-check pass.
pub fn name(&self) -> &str
pub fn dbu(&self) -> i64
pub fn grid(&self) -> i64
pub fn set_grid(&mut self, grid: i64)
pub fn layer(&self, info: LayerInfo) -> LayerIndex
pub fn layer_info(&self, idx: LayerIndex) -> LayerInfo
pub fn layer_by_gds(&self, layer: u16, datatype: u16) -> Option<LayerIndex>
pub fn layer_by_name(&self, name: &str) -> Option<LayerIndex>
Sourcepub fn insert(&self, builder: CellBuilder) -> CellId
pub fn insert(&self, builder: CellBuilder) -> CellId
Freeze a builder and insert into the library, returning a CellId.
If a cell with the same ContentHash already exists, the existing
CellId is returned and the builder is discarded.
pub fn get(&self, id: CellId) -> Arc<Cell>
pub fn try_get(&self, id: CellId) -> Option<Arc<Cell>>
pub fn by_name(&self, name: &str) -> Option<CellId>
pub fn by_content(&self, hash: ContentHash) -> Option<CellId>
pub fn cell_count(&self) -> usize
pub fn build<C: Component>(&self, c: &C) -> CellId
Sourcepub fn top_cells(&self) -> Vec<CellId>
pub fn top_cells(&self) -> Vec<CellId>
Cells with no parents in this library. Walks all cells and subtracts any referenced as instance children.
pub fn all_cells(&self) -> Vec<(CellId, Arc<Cell>)>
Auto Trait Implementations§
impl !Freeze for Library
impl !RefUnwindSafe for Library
impl Send for Library
impl Sync for Library
impl Unpin for Library
impl UnsafeUnpin for Library
impl UnwindSafe for Library
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more