Skip to main content

FilterUnit

Struct FilterUnit 

Source
pub struct FilterUnit<'a, R: Reader<Offset = usize>> {
    pub read_unit: UnitRef<'a, R>,
    pub read_skeleton_unit: Option<UnitRef<'a, R>>,
    /* private fields */
}
Expand description

The state for identifying which DIEs in a .debug_info unit need to be converted.

This is created by FilterUnitSection::read_unit.

See FilterUnitSection for an example.

Fields§

§read_unit: UnitRef<'a, R>

The unit being read.

§read_skeleton_unit: Option<UnitRef<'a, R>>

The skeleton unit being read if read_unit is a split unit.

Implementations§

Source§

impl<'a, R: Reader<Offset = usize>> FilterUnit<'a, R>

Source

pub fn null_entry(&self) -> FilterUnitEntry<'a, R>

Return a null DIE for use with FilterUnit::read_entry.

Source

pub fn read_entry( &mut self, entry: &mut FilterUnitEntry<'a, R>, ) -> ConvertResult<bool>

Read the next DIE.

Returns false if the unit has no more DIEs.

This also records dependencies for the DIE:

  • the DIE always depends on its parent
  • the parent may depend on the DIE
  • the DIE depends on any DIEs that are referenced by its attributes

The only task the user needs to perform is to call FilterUnit::require_entry if the DIE is always required to be converted. Typically, a DIE will be required if it has a valid address range.

Source

pub fn require_entry(&mut self, offset: UnitOffset)

Indicate that the DIE with the given offset is always required to be converted.

Typically, this will be called if the DIE has a valid address range.

This can only be called for offsets within the current unit.

Trait Implementations§

Source§

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

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a, R> Freeze for FilterUnit<'a, R>
where R: Freeze,

§

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

§

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

§

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

§

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

§

impl<'a, R> UnsafeUnpin for FilterUnit<'a, R>
where R: UnsafeUnpin,

§

impl<'a, R> !UnwindSafe for FilterUnit<'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<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.