Struct libreda_db::layout::cell::Cell [−][src]
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]
&self,
template_cell: &Rc<Cell<C>>,
transform: SimpleTransform<C>
) -> Rc<CellInstance<C>>
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]
&self,
layer_index: LayerIndex
) -> impl Iterator<Item = Rc<Shape<C>>> + '_
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]
fn hash<H: Hasher>(&self, state: &mut H)
[src]
pub fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl<C: CoordinateType> PartialEq<Cell<C>> for Cell<C>
[src]
impl<C: CoordinateType> TryBoundingBox<C> for Cell<C>
[src]
fn try_bounding_box(&self) -> Option<Rect<C>>
[src]
impl<C: CoordinateType> WithProperties for Cell<C>
[src]
type Key = String
Property key type.
fn with_properties<F, R>(&self, f: F) -> R where
F: FnOnce(Option<&PropertyStore<Self::Key>>) -> R,
[src]
F: FnOnce(Option<&PropertyStore<Self::Key>>) -> R,
fn with_properties_mut<F, R>(&self, f: F) -> R where
F: FnOnce(&mut PropertyStore<Self::Key>) -> R,
[src]
F: FnOnce(&mut PropertyStore<Self::Key>) -> R,
fn property<Q: ?Sized>(&self, key: &Q) -> Option<PropertyValue> where
Self::Key: Borrow<Q>,
Q: Eq + Hash,
[src]
Self::Key: Borrow<Q>,
Q: Eq + Hash,
fn property_str<Q: ?Sized>(&self, key: &Q) -> Option<Rc<String>> where
Self::Key: Borrow<Q>,
Q: Eq + Hash,
[src]
Self::Key: Borrow<Q>,
Q: Eq + Hash,
fn set_property<V: Into<PropertyValue>>(
&self,
key: Self::Key,
value: V
) -> Option<PropertyValue>
[src]
&self,
key: Self::Key,
value: V
) -> Option<PropertyValue>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> TextType for T where
T: Clone + Eq + Debug + Hash,
[src]
T: Clone + Eq + Debug + Hash,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,