[][src]Struct falcon::il::Program

pub struct Program { /* fields omitted */ }

A representation of a program by il::Function

Methods

impl Program[src]

pub fn new() -> Program[src]

Creates a new, empty Program.

pub fn function_by_address(&self, address: u64) -> Option<&Function>[src]

Search for a Function by its optional address, assuming one was assigned. Returns the Function if found, or None if not found.

pub fn functions(&self) -> Vec<&Function>[src]

Get all Function for this Program.

pub fn functions_map(&self) -> BTreeMap<usize, &Function>[src]

Get the underlying BTreeMap holding all Function for this Program.

pub fn function(&self, index: usize) -> Option<&Function>[src]

Get a Function by its index.

A Function index is assigned by Program and is not the address where the Function was discovered.

pub fn add_function(&mut self, function: Function)[src]

Add a Function to the Program.

This will also assign an index to the Function.

pub fn function_by_name(&self, name: &str) -> Option<&Function>[src]

Get a Function by its name.

Trait Implementations

impl Clone for Program[src]

impl Debug for Program[src]

impl<'de> Deserialize<'de> for Program[src]

impl Display for Program[src]

impl Serialize for Program[src]

Auto Trait Implementations

impl !RefUnwindSafe for Program

impl !Send for Program

impl !Sync for Program

impl Unpin for Program

impl !UnwindSafe for Program

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.