pub struct LineRows<R, Program, Offset = <R as Reader>::Offset>{ /* private fields */ }
Expand description
Executes a LineProgram
to iterate over the rows in the matrix of line number information.
“The hypothetical machine used by a consumer of the line number information to expand the byte-coded instruction stream into a matrix of line number information.” – Section 6.2.1
Implementations§
source§impl<R, Program, Offset> LineRows<R, Program, Offset>
impl<R, Program, Offset> LineRows<R, Program, 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
.
Trait Implementations§
source§impl<R, Program, Offset> Clone for LineRows<R, Program, Offset>where
Program: LineProgram<R, Offset> + Clone,
R: Reader<Offset = Offset> + Clone,
Offset: ReaderOffset + Clone,
impl<R, Program, Offset> Clone for LineRows<R, Program, Offset>where
Program: LineProgram<R, Offset> + Clone,
R: Reader<Offset = Offset> + Clone,
Offset: ReaderOffset + Clone,
Auto Trait Implementations§
impl<R, Program, Offset> Freeze for LineRows<R, Program, Offset>
impl<R, Program, Offset> RefUnwindSafe for LineRows<R, Program, Offset>where
Program: RefUnwindSafe,
R: RefUnwindSafe,
impl<R, Program, Offset> Send for LineRows<R, Program, Offset>
impl<R, Program, Offset> Sync for LineRows<R, Program, Offset>
impl<R, Program, Offset> Unpin for LineRows<R, Program, Offset>
impl<R, Program, Offset> UnwindSafe for LineRows<R, Program, Offset>where
Program: UnwindSafe,
R: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)