Struct falcon::il::Program [−][src]
pub struct Program { /* fields omitted */ }
A representation of a program by il::Function
Methods
impl Program
[src]
impl Program
pub fn new() -> Program
[src]
pub fn new() -> Program
Creates a new, empty Program
.
pub fn function_by_address(&self, address: u64) -> Option<&Function>
[src]
pub fn function_by_address(&self, address: u64) -> Option<&Function>
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]
pub fn functions(&self) -> Vec<&Function>
Get all Function
for this Program
.
pub fn functions_map(&self) -> BTreeMap<usize, &Function>
[src]
pub fn functions_map(&self) -> BTreeMap<usize, &Function>
Get the underlying BTreeMap holding all Function
for this Program
.
pub fn function(&self, index: usize) -> Option<&Function>
[src]
pub fn function(&self, index: usize) -> Option<&Function>
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]
pub fn add_function(&mut self, function: Function)
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]
pub fn function_by_name(&self, name: &str) -> Option<&Function>
Get a Function
by its name.
Trait Implementations
impl Clone for Program
[src]
impl Clone for Program
fn clone(&self) -> Program
[src]
fn clone(&self) -> Program
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
1.0.0
[src]Performs copy-assignment from source
. Read more
impl Debug for Program
[src]
impl Debug for Program
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Display for Program
[src]
impl Display for Program