pub struct ComponentRef { /* private fields */ }Expand description
Reference to a component in a circuit.
Implementations§
Source§impl ComponentRef
impl ComponentRef
Sourcepub fn connection(&self, index: usize) -> ConnectionRef
pub fn connection(&self, index: usize) -> ConnectionRef
Get the index-th connection to the component.
Sourcepub fn connection_count(&self) -> usize
pub fn connection_count(&self) -> usize
Get all connections to the component.
Sourcepub fn assemble(connections: &Vec<ConnectionRef>) -> Self
pub fn assemble(connections: &Vec<ConnectionRef>) -> Self
Assemble a compound component from some existing connections.
These will become the terminals of the new component.
Trait Implementations§
Source§impl Clone for ComponentRef
impl Clone for ComponentRef
Source§fn clone(&self) -> ComponentRef
fn clone(&self) -> ComponentRef
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for ComponentRef
impl RefUnwindSafe for ComponentRef
impl Send for ComponentRef
impl Sync for ComponentRef
impl Unpin for ComponentRef
impl UnwindSafe for ComponentRef
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