pub struct Program(_);
Expand description

A parsed program of Brainfuck-link language.

Each instruction can be acceseed by ProgramIndex.

Implementations

Create a new program from an Instruction vector.

Get the instructions of the program.

Get an indef which points the first instruction of the program.

If instructins are empty, returns None.

Step index to the next instruction.

If the index already points to the last instruction of the program or the last instruction of the sub-instructions (in Instruction::UntilZero instruction), the index is not changed and this function returns false. Otherwise, the index is changed to point to the next instruction and this function returns true.

This function does not step into sub-instructions of Instruction::UntilZero instruction.

Trait Implementations

Formats the value using the given formatter. Read more

The returned type after indexing.

Performs the indexing (container[index]) operation. 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

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.