pub type StateMachine<R, Program, Offset> = LineRows<R, Program, Offset>;
👎Deprecated: StateMachine has been renamed to LineRows, use that instead.
Expand description
Deprecated. StateMachine
has been renamed to LineRows
.
Aliased Type§
struct StateMachine<R, Program, Offset> {
program: Program,
row: LineRow,
instructions: LineInstructions<R>,
}
Fields§
§program: Program
§row: LineRow
§instructions: LineInstructions<R>
Implementations
Source§impl<R, Program, Offset> LineRows<R, Program, Offset>
impl<R, Program, Offset> LineRows<R, Program, Offset>
fn new( program: IncompleteLineProgram<R, Offset>, ) -> LineRows<R, IncompleteLineProgram<R, Offset>, Offset>
fn resume<'program>( program: &'program CompleteLineProgram<R, Offset>, sequence: &LineSequence<R>, ) -> LineRows<R, &'program CompleteLineProgram<R, Offset>, Offset>
Sourcepub fn header(&self) -> &LineProgramHeader<R, Offset>
pub fn header(&self) -> &LineProgramHeader<R, Offset>
Get a reference to the header for this state machine’s line number program.
Sourcepub fn next_row(
&mut self,
) -> Result<Option<(&LineProgramHeader<R, Offset>, &LineRow)>>
pub fn next_row( &mut self, ) -> Result<Option<(&LineProgramHeader<R, Offset>, &LineRow)>>
Parse and execute the next instructions in the line number program until another row in the line number matrix is computed.
The freshly computed row is returned as Ok(Some((header, row)))
.
If the matrix is complete, and there are no more new rows in the line
number matrix, then Ok(None)
is returned. If there was an error parsing
an instruction, then Err(e)
is returned.
Unfortunately, the references mean that this cannot be a
FallibleIterator
.