[−][src]Struct gimli::read::EntriesTree
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. The EntriesTree
contains
shared state for all nodes in the tree, avoiding any duplicate parsing of
entries during the traversal.
Example Usage
let unit = get_some_unit(); let abbrevs = get_abbrevs_for_unit(&unit); let mut tree = unit.entries_tree(&abbrevs, None)?; let root = tree.root()?; process_tree(root)?; fn process_tree<R>(mut node: gimli::EntriesTreeNode<R>) -> gimli::Result<()> where R: gimli::Reader { { // Examine the entry attributes. let mut attrs = node.entry().attrs(); while let Some(attr) = attrs.next()? { } } let mut children = node.children(); while let Some(child) = children.next()? { // Recursively process a child. process_tree(child); } Ok(()) }
Implementations
impl<'abbrev, 'unit, R: Reader> EntriesTree<'abbrev, 'unit, R>
[src]
pub fn root<'me>(
&'me mut self
) -> Result<EntriesTreeNode<'abbrev, 'unit, 'me, R>>
[src]
&'me mut self
) -> Result<EntriesTreeNode<'abbrev, 'unit, 'me, R>>
Returns the root node of the tree.
Trait Implementations
impl<'abbrev, 'unit, R: Clone> Clone for EntriesTree<'abbrev, 'unit, R> where
R: Reader,
[src]
R: Reader,
fn clone(&self) -> EntriesTree<'abbrev, 'unit, R>
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'abbrev, 'unit, R: Debug> Debug for EntriesTree<'abbrev, 'unit, R> where
R: Reader,
[src]
R: Reader,
Auto Trait Implementations
impl<'abbrev, 'unit, R> Send for EntriesTree<'abbrev, 'unit, R> where
R: Send + Sync,
<R as Reader>::Offset: Send + Sync,
R: Send + Sync,
<R as Reader>::Offset: Send + Sync,
impl<'abbrev, 'unit, R> !Sync for EntriesTree<'abbrev, 'unit, R>
impl<'abbrev, 'unit, R> Unpin for EntriesTree<'abbrev, 'unit, R> where
R: Unpin,
<R as Reader>::Offset: Unpin,
R: Unpin,
<R as Reader>::Offset: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,