Struct gimli::EntriesTree [] [src]

pub struct EntriesTree<'input, 'abbrev, 'unit, Endian> where 'input: 'unit,
        Endian: Endianity + 'unit
{ /* fields omitted */ }

The state information for a tree view of the Debugging Information Entries.

The EntriesTree can be used to recursively iterate through the DIE tree, following the parent/child relationships. It maintains a single EntriesCursor that is used to parse the entries, allowing it to avoid any duplicate parsing of entries.

Example Usage

extern crate gimli;

let unit = get_some_unit();
let abbrevs = get_abbrevs_for_unit(&unit);

let mut tree = try!(unit.entries_tree(&abbrevs, None));
try!(process_tree(tree.iter()));

fn process_tree<E>(mut iter: gimli::EntriesTreeIter<E>) -> gimli::Result<()>
    where E: gimli::Endianity
{
    if let Some(entry) = iter.entry() {
        // Examine the entry attributes.
    }
    while let Some(child) = try!(iter.next()) {
        // Recursively process a child.
        process_tree(child);
    }
    Ok(())
}

Methods

impl<'input, 'abbrev, 'unit, Endian> EntriesTree<'input, 'abbrev, 'unit, Endian> where Endian: Endianity
[src]

Returns an iterator for the entries that are children of the current entry.

Trait Implementations

impl<'input, 'abbrev, 'unit, Endian: Clone> Clone for EntriesTree<'input, 'abbrev, 'unit, Endian> where 'input: 'unit,
        Endian: Endianity + 'unit
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'input, 'abbrev, 'unit, Endian: Debug> Debug for EntriesTree<'input, 'abbrev, 'unit, Endian> where 'input: 'unit,
        Endian: Endianity + 'unit
[src]

Formats the value using the given formatter.