1
0
Fork 0
forked from wry/wry
wry/src/criteria/clm/clm_matchers/clmm_id.rs
2026-03-07 18:19:59 +01:00

19 lines
457 B
Rust

use {
crate::{
client::{Client, ClientId},
criteria::{RootMatcherMap, clm::RootMatchers, crit_graph::CritRootCriterion},
},
std::rc::Rc,
};
pub struct ClmMatchId(pub ClientId);
impl CritRootCriterion<Rc<Client>> for ClmMatchId {
fn matches(&self, data: &Rc<Client>) -> bool {
data.id == self.0
}
fn nodes(roots: &RootMatchers) -> Option<&RootMatcherMap<Rc<Client>, Self>> {
Some(&roots.id)
}
}