1
0
Fork 0
forked from wry/wry
wry/src/criteria/clm/clm_matchers/clmm_pid.rs

19 lines
442 B
Rust

use {
crate::{
client::Client,
criteria::{RootMatcherMap, clm::RootMatchers, crit_graph::CritRootCriterion},
},
uapi::c,
};
pub struct ClmMatchPid(pub c::pid_t);
impl CritRootCriterion<Client> for ClmMatchPid {
fn matches(&self, data: &Client) -> bool {
data.pid_info.pid == self.0
}
fn nodes(roots: &RootMatchers) -> Option<&RootMatcherMap<Client, Self>> {
Some(&roots.pid)
}
}