pub struct ComponentBuilder<Rust = Infallible> { /* private fields */ }Expand description
The constructor for Component
you create one with Component::builder()
use gate to add another inner gate
use inputs to set the input locations and
finalize construction (get your final Component)
put a gate implemented in rust (or an enum of them) in <Rust> to use it
(or them)
Implementations§
Source§impl<Rust> ComponentBuilder<Rust>
impl<Rust> ComponentBuilder<Rust>
Sourcepub fn gate(self, gate: Gate<Rust>, sequals: Vec<Sequal>) -> Self
pub fn gate(self, gate: Gate<Rust>, sequals: Vec<Sequal>) -> Self
Add a gate to the component
gate is the gate you want to add.
sequals dictate where the outputs of the gate go, in other words the
wiring, these sequals are in order, so the gate’s first output
will go to the first sequal and so on.
a sequal can either be another gate or one of the components outputs.
if you want to send an output to several places it must be done
indirectly, you should take a look at Gate::dup.
Trait Implementations§
Auto Trait Implementations§
impl<Rust> Freeze for ComponentBuilder<Rust>
impl<Rust> RefUnwindSafe for ComponentBuilder<Rust>where
Rust: RefUnwindSafe,
impl<Rust> Send for ComponentBuilder<Rust>where
Rust: Send,
impl<Rust> Sync for ComponentBuilder<Rust>where
Rust: Sync,
impl<Rust> Unpin for ComponentBuilder<Rust>where
Rust: Unpin,
impl<Rust> UnwindSafe for ComponentBuilder<Rust>where
Rust: 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