19 lines
442 B
Rust
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)
|
|
}
|
|
}
|