Struct gimli::read::LineRows

source ·
pub struct LineRows<R, Program, Offset = <R as Reader>::Offset>where
    Program: LineProgram<R, Offset>,
    R: Reader<Offset = Offset>,
    Offset: ReaderOffset,{ /* 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>where Program: LineProgram<R, Offset>, R: Reader<Offset = Offset>, Offset: ReaderOffset,

source

pub fn header(&self) -> &LineProgramHeader<R, Offset>

Get a reference to the header for this state machine’s line number program.

source

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,

source§

fn clone(&self) -> LineRows<R, Program, Offset>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl<R, Program, Offset> Debug for LineRows<R, Program, Offset>where Program: LineProgram<R, Offset> + Debug, R: Reader<Offset = Offset> + Debug, Offset: ReaderOffset + Debug,

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

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>where Program: Send, R: Send,

§

impl<R, Program, Offset> Sync for LineRows<R, Program, Offset>where Program: Sync, R: Sync,

§

impl<R, Program, Offset> Unpin for LineRows<R, Program, Offset>where Program: Unpin, R: Unpin,

§

impl<R, Program, Offset> UnwindSafe for LineRows<R, Program, Offset>where Program: UnwindSafe, R: UnwindSafe,

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

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

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.