pub struct Machine<I: MachineInstruction, R: MachineRegister, O: OutputReceiver<R>> {
    pub register: R,
    pub output_receiver: O,
    /* private fields */
}
Expand description

A machine which can run instructions.

Fields

register: Routput_receiver: O

Implementations

Constructs a new machine which uses a HashMapRegister and the NoopOutputReceiver.

Constructs a new machine where you specify your own register and output receiver.

Let the program run.

Returns the program counter.

Fetch the instruction at position idx, if any.

Replaces the instruction at position idx, if any.

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

Returns the argument unchanged.

Calls U::from(self).

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

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.