Skip to main content

FilterUnitEntry

Struct FilterUnitEntry 

Source
#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional 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>

Source

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>>§

Source

pub fn is_null(&self) -> bool

Return true if the entry tag is DW_TAG_null.

Source

pub fn depth(&self) -> isize

Get the tree depth of this entry relative to the entry where reading started.

Source

pub fn offset(&self) -> UnitOffset<Offset>

Get this entry’s offset.

Source

pub fn tag(&self) -> DwTag

Get this entry’s tag.

Source

pub fn has_children(&self) -> bool

Return true if this entry’s type can have children, false otherwise.

Source

pub fn attrs(&self) -> &[Attribute<R>]

Return this entry’s set of attributes.

Source

pub fn has_attr(&self, name: DwAt) -> bool

Return true if this entry has an attribute with the given name.

Source

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.

Source

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.

Source

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.

Trait Implementations§

Source§

impl<'a, R: Debug + Reader<Offset = usize>> Debug for FilterUnitEntry<'a, R>

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'a, R: Reader<Offset = usize>> Deref for FilterUnitEntry<'a, R>

Source§

type Target = DebuggingInformationEntry<R>

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.

Auto Trait Implementations§

§

impl<'a, R> Freeze for FilterUnitEntry<'a, R>

§

impl<'a, R> RefUnwindSafe for FilterUnitEntry<'a, R>
where R: RefUnwindSafe,

§

impl<'a, R> Send for FilterUnitEntry<'a, R>
where R: Sync + Send,

§

impl<'a, R> Sync for FilterUnitEntry<'a, R>
where R: Sync + Send,

§

impl<'a, R> Unpin for FilterUnitEntry<'a, R>
where R: Unpin,

§

impl<'a, R> UnsafeUnpin for FilterUnitEntry<'a, R>

§

impl<'a, R> UnwindSafe for FilterUnitEntry<'a, R>

Blanket Implementations§

Source§

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

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where 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 T
where 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<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

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

Source§

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 T
where U: TryFrom<T>,

Source§

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.