Struct ModuleInfo

Source
pub struct ModuleInfo<'s> { /* private fields */ }
Expand description

This struct contains data about a single module from its module info stream.

The module info stream is where private symbols and line info is stored.

Implementations§

Source§

impl<'s> ModuleInfo<'s>

Source

pub fn symbols(&self) -> Result<SymbolIter<'_>>

Get an iterator over the all symbols in this module.

Source

pub fn symbols_at(&self, index: SymbolIndex) -> Result<SymbolIter<'_>>

Get an iterator over symbols starting at the given index.

Source

pub fn line_program(&self) -> Result<LineProgram<'_>>

Returns a line program that gives access to file and line information in this module.

Source

pub fn inlinees(&self) -> Result<InlineeIterator<'_>>

Returns an iterator over all inlinees in this module.

Inlinees are not guaranteed to be sorted. When requiring random access by ItemId, collect them into a mapping structure rather than reiterating multiple times.

Source

pub fn exports(&self) -> Result<CrossModuleExports>

Returns a table of exports declared by this module.

Source

pub fn imports(&self) -> Result<CrossModuleImports<'_>>

Returns a table of imports of this module.

Auto Trait Implementations§

§

impl<'s> Freeze for ModuleInfo<'s>

§

impl<'s> !RefUnwindSafe for ModuleInfo<'s>

§

impl<'s> !Send for ModuleInfo<'s>

§

impl<'s> !Sync for ModuleInfo<'s>

§

impl<'s> Unpin for ModuleInfo<'s>

§

impl<'s> !UnwindSafe for ModuleInfo<'s>

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.