Struct libreda_db::reference_access::ShapeRef

source ·
pub struct ShapeRef<'a, L: LayoutBase + ?Sized> { /* private fields */ }
Expand description

Reference to a shape.

Implementations§

source§

impl<'a, L: L2NBase> ShapeRef<'a, L>

source

pub fn net(&self) -> Option<NetRef<'_, L>>

Get the net which is connected to this shape, if any.

source

pub fn pin(&self) -> Option<PinRef<'_, L>>

Get the pin which is connected to this shape, if any.

source§

impl<'a, L: LayoutBase> ShapeRef<'a, L>

source

pub fn id(&self) -> L::ShapeId

Get the shape ID.

source

pub fn cell(&self) -> CellRef<'_, L>

Get the cell where this shape lives.

source

pub fn layer(&self) -> LayerRef<'_, L>

Get the layer of the shape.

source

pub fn geometry_cloned(&self) -> Geometry<L::Coord>

Get the cloned geometry struct representing this shape.

Trait Implementations§

source§

impl<'a, L: LayoutBase> PartialEq for ShapeRef<'a, L>

source§

fn eq(&self, other: &Self) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl<'a, L: LayoutBase> Eq for ShapeRef<'a, L>

Auto Trait Implementations§

§

impl<'a, L> Freeze for ShapeRef<'a, L>
where <L as LayoutIds>::ShapeId: Freeze, L: ?Sized,

§

impl<'a, L> RefUnwindSafe for ShapeRef<'a, L>

§

impl<'a, L> Send for ShapeRef<'a, L>
where <L as LayoutIds>::ShapeId: Send, L: Sync + ?Sized,

§

impl<'a, L> Sync for ShapeRef<'a, L>
where <L as LayoutIds>::ShapeId: Sync, L: Sync + ?Sized,

§

impl<'a, L> Unpin for ShapeRef<'a, L>
where <L as LayoutIds>::ShapeId: Unpin, L: ?Sized,

§

impl<'a, L> UnwindSafe for ShapeRef<'a, L>

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.