#[non_exhaustive]pub struct FilterUnitEntry<'a, R: Reader<Offset = usize>> {
pub read_unit: UnitRef<'a, R>,
pub read_entry: DebuggingInformationEntry<R>,
pub parent: Option<UnitOffset>,
pub parent_tag: Option<DwTag>,
}Expand description
A DIE read by FilterUnit::read_entry.
This is a simple wrapper that adds some extra information to
read::DebuggingInformationEntry. The inner Self::read_entry is accessible
via Deref.
See FilterUnitSection for an example.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.read_unit: UnitRef<'a, R>The unit that this DIE was read from.
This may be a skeleton unit.
read_entry: DebuggingInformationEntry<R>The DIE that was read.
parent: Option<UnitOffset>The offset of this DIE’s parent, if any.
This is set to None if the parent is the root of the unit.
parent_tag: Option<DwTag>The tag of this DIE’s parent, if any.
This is set to None if the parent is the root of the unit.
Implementations§
Source§impl<'a, R: Reader<Offset = usize>> FilterUnitEntry<'a, R>
impl<'a, R: Reader<Offset = usize>> FilterUnitEntry<'a, R>
Sourcepub fn null(read_unit: UnitRef<'a, R>) -> Self
pub fn null(read_unit: UnitRef<'a, R>) -> Self
Return a null entry.
This can be used with FilterUnit::read_entry,
Methods from Deref<Target = DebuggingInformationEntry<R>>§
Sourcepub fn depth(&self) -> isize
pub fn depth(&self) -> isize
Get the tree depth of this entry relative to the entry where reading started.
Sourcepub fn offset(&self) -> UnitOffset<Offset>
pub fn offset(&self) -> UnitOffset<Offset>
Get this entry’s offset.
Sourcepub fn has_children(&self) -> bool
pub fn has_children(&self) -> bool
Return true if this entry’s type can have children, false otherwise.
Sourcepub fn has_attr(&self, name: DwAt) -> bool
pub fn has_attr(&self, name: DwAt) -> bool
Return true if this entry has an attribute with the given name.
Sourcepub fn attr(&self, name: DwAt) -> Option<&Attribute<R>>
pub fn attr(&self, name: DwAt) -> Option<&Attribute<R>>
Find the first attribute in this entry which has the given name.
Returns None if no attribute is found.
Sourcepub fn attr_value_raw(&self, name: DwAt) -> Option<AttributeValue<R>>
pub fn attr_value_raw(&self, name: DwAt) -> Option<AttributeValue<R>>
Find the first attribute in this entry which has the given name, and return its raw value.
Returns None if no attribute is found.
Sourcepub fn attr_value(&self, name: DwAt) -> Option<AttributeValue<R>>
pub fn attr_value(&self, name: DwAt) -> Option<AttributeValue<R>>
Find the first attribute in this entry which has the given name, and return its normalized value.
Returns None if no attribute is found.