pub struct TaskIter { /* private fields */ }
Expand description
A structure supporting BPF iterators that handle task
§Example
use redbpf::load::Loader;
let mut loaded = Loader::load(probe_code()).unwrap();
let tasks = loaded
.task_iter_mut("dump_tgid")
.expect("dump_tgid task iterator not found");
for tgid in tasks
.bpf_iter::<libc::pid_t>()
.expect("error on Taskiter::bpf_iter")
{
println!("{}", tgid);
}
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskIter
impl RefUnwindSafe for TaskIter
impl Send for TaskIter
impl Sync for TaskIter
impl Unpin for TaskIter
impl UnwindSafe for TaskIter
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more