Struct libreda_db::layout::cell::Cell[][src]

pub struct Cell<C: CoordinateType> { /* fields omitted */ }

A Cell is a container for geometrical shapes organized on different layers. Additionally to the geometrical shapes a cell can also contain instances of other cells.

Implementations

impl<C: CoordinateType> Cell<C>[src]

pub fn index(&self) -> CellIndex[src]

Get index of this cell.

pub fn name(&self) -> Option<String>[src]

Return the cell name if it is defined.

pub fn clear_shapes(&self)[src]

Remove all shapes from this cell.

pub fn clear_instances(&self)[src]

Remove all instances from this cell.

pub fn clear(&self)[src]

Remove all shapes and instances from this cell.

pub fn clear_layer(&self, layer_index: LayerIndex)[src]

Remove all shapes from the given layer.

pub fn create_instance(
    &self,
    template_cell: &Rc<Cell<C>>,
    transform: SimpleTransform<C>
) -> Rc<CellInstance<C>>
[src]

Insert a child cell instance.

pub fn num_references(&self) -> usize[src]

Get the number of cell instances that reference this cell.

pub fn remove_cell_instance(&self, cell_instance: &Rc<CellInstance<C>>)[src]

Remove the given cell instance from this cell.

Panics

Panics if the cell instance does not live in this cell. TODO: Return an Err and let the user decide how to handle the error.

pub fn self_reference(&self) -> Weak<Self>[src]

Get reference to this cell.

pub fn shapes(&self, layer_index: LayerIndex) -> Option<Rc<Shapes<C>>>[src]

Get the shapes object for the given layer.

pub fn shapes_get_or_create(&self, layer_index: LayerIndex) -> Rc<Shapes<C>>[src]

Get the mutable shapes object for the given layer or create a new one when no exists for this index.

pub fn each_used_layer(&self) -> Vec<LayerIndex>[src]

Return a Vec of all layers that contain at least one shape.

pub fn each_shape(
    &self,
    layer_index: LayerIndex
) -> impl Iterator<Item = Rc<Shape<C>>> + '_
[src]

Returns an iterator over all shapes of a given layer.

pub fn each_inst(&self) -> impl Iterator<Item = Rc<CellInstance<C>>> + '_[src]

Returns an iterator over all child instances. (Returns reference to resource counted pointer).

pub fn is_leaf(&self) -> bool[src]

Returns true if this cell does not contain any other cell instances.

Trait Implementations

impl<C: Clone + CoordinateType> Clone for Cell<C>[src]

impl<C: Debug + CoordinateType> Debug for Cell<C>[src]

impl<C: CoordinateType> Eq for Cell<C>[src]

impl<C: CoordinateType> Hash for Cell<C>[src]

impl<C: CoordinateType> PartialEq<Cell<C>> for Cell<C>[src]

impl<C: CoordinateType> TryBoundingBox<C> for Cell<C>[src]

impl<C: CoordinateType> WithProperties for Cell<C>[src]

type Key = String

Property key type.

Auto Trait Implementations

impl<C> !RefUnwindSafe for Cell<C>

impl<C> !Send for Cell<C>

impl<C> !Sync for Cell<C>

impl<C> Unpin for Cell<C>

impl<C> !UnwindSafe for Cell<C>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> TextType for T where
    T: Clone + Eq + Debug + Hash
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.