pub struct PortGeometryBuilder<L> { /* private fields */ }
Expand description
A set of geometry associated with a layout port.
Implementations§
Source§impl<L: Clone> PortGeometryBuilder<L>
impl<L: Clone> PortGeometryBuilder<L>
Sourcepub fn push(&mut self, shape: Shape<L>)
pub fn push(&mut self, shape: Shape<L>)
Push an unnamed shape to the port.
If the primary shape has not been set yet, sets the primary shape to the new shape instead of adding to the unnamed shapes list.
The primary shape can be overriden using PortGeometryBuilder::set_primary
.
Source§impl<L> PortGeometryBuilder<L>
impl<L> PortGeometryBuilder<L>
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new, empty PortGeometryBuilder
.
Sourcepub fn build(self) -> Result<PortGeometry<L>>
pub fn build(self) -> Result<PortGeometry<L>>
Builds a port geometry.
Sourcepub fn merge(&mut self, other: impl Into<PortGeometry<L>>)
pub fn merge(&mut self, other: impl Into<PortGeometry<L>>)
Merges PortGeometry
other
into self
, overwriting the primary and corresponding named shapes
and moving their old values to the collection of unnamed shapes.
Sourcepub fn set_primary(&mut self, shape: Shape<L>)
pub fn set_primary(&mut self, shape: Shape<L>)
Sets the primary shape of this port, moving the current primary to the set of unnamed shapes.
Trait Implementations§
Source§impl<L: Clone> Clone for PortGeometryBuilder<L>
impl<L: Clone> Clone for PortGeometryBuilder<L>
Source§fn clone(&self) -> PortGeometryBuilder<L>
fn clone(&self) -> PortGeometryBuilder<L>
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl<L: Debug> Debug for PortGeometryBuilder<L>
impl<L: Debug> Debug for PortGeometryBuilder<L>
Source§impl<L> Default for PortGeometryBuilder<L>
impl<L> Default for PortGeometryBuilder<L>
Auto Trait Implementations§
impl<L> Freeze for PortGeometryBuilder<L>where
L: Freeze,
impl<L> RefUnwindSafe for PortGeometryBuilder<L>where
L: RefUnwindSafe,
impl<L> Send for PortGeometryBuilder<L>where
L: Send,
impl<L> Sync for PortGeometryBuilder<L>where
L: Sync,
impl<L> Unpin for PortGeometryBuilder<L>where
L: Unpin,
impl<L> UnwindSafe for PortGeometryBuilder<L>where
L: UnwindSafe,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
, which can then be
downcast
into Box<dyn ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
, which can then be further
downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T
in a tonic::Request