ToTrace

Trait ToTrace 

Source
pub trait ToTrace {
    // Provided method
    fn trace(self) -> Trace<Self>
       where Self: Sized + Clone + Disassemble { ... }
}
Expand description

Wraps an object up in a Trace, so that each mutation is printed to stdout.

Provided Methods§

Source

fn trace(self) -> Trace<Self>
where Self: Sized + Clone + Disassemble,

Wraps an object up in a Trace, so that each mutation is printed to stdout.

Examples found in repository?
examples/ng.rs (line 18)
13fn main() {
14    let target_function = zero as fn(u8) -> RunResult<u8>;
15
16    // do a bruteforce search for Z80 machine code programs implementing the same function
17    let mut bruteforce = strop::mips::O32::default()
18        .trace()
19        .to_bruteforce(target_function);
20
21    let bf = bruteforce.search().unwrap();
22
23    println!("An equivalent subroutine we found by bruteforce search,");
24    println!("after {} iterations.", bruteforce.count);
25    bf.dasm();
26}

Implementors§

Source§

impl<T> ToTrace for T