Support iterator over Record
keiichiw opened this issue · comments
To iterate over Record
s in a given Input
, the current supported way is implementing the Handler
and call Handler::process
, which is a wrapper of tracecmd_iterate_events()
.
To support more flexible handling, it'd be nice to support Iterator
whose Item
is Record
.
let input = Input::new(...)?;
for event in input.to_iter() {
// process event
}
Its next()
should be able to be implemented by wrapping tracecmd_read_data
.