#[trace_with]
Expand description
The #[trace_with]
macro. Needs to be applied to function definitions,
and will invoke hte Trace
interface on the user-provided expression.
ยงExample
use call_trace::{trace_with, CallContext, Trace};
impl MyType {
#[trace_with(self)]
fn foo(&mut self) {
// ...
}
}
impl Trace for MyType {
fn on_pre(&mut self, ctx: &CallContext) {
// ...
}
fn on_post(&mut self, ctx: &CallContext) {
// ...
}
}