#[macro_export]
macro_rules! combine_query {
($trait_name:ident, $trait_fn:ident, $operator:expr, $struct:ident, $partner:ident) => {
impl<'a, V: LdapValue> $trait_name<$partner<'a, V>> for $struct<'a, V> {
type Output = Group<'a, V>;
fn $trait_fn(self, rhs: $partner<'a, V>) -> Self::Output {
self.$trait_fn(&rhs)
}
}
impl<'a, V: LdapValue> $trait_name<$partner<'a, V>> for &$struct<'a, V> {
type Output = Group<'a, V>;
fn $trait_fn(self, rhs: $partner<'a, V>) -> Self::Output {
self.$trait_fn(&rhs)
}
}
impl<'a, V: LdapValue> $trait_name<&$partner<'a, V>> for $struct<'a, V> {
type Output = Group<'a, V>;
fn $trait_fn(self, rhs: &$partner<'a, V>) -> Self::Output {
(&self).$trait_fn(rhs)
}
}
}
}