Struct logic_circus::ComponentBuilder[][src]

pub struct ComponentBuilder<Rust = Infallible> { /* fields omitted */ }
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

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.

Tell the component where it’s inputs should go

after you’ve added many gates to your component you still need to tell the component where to start, once you do that your component is ready and it will be returned from the function

Trait Implementations

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.