#[non_exhaustive]pub enum TargetFilter {
All,
DnPattern(String),
ObjectClass(String),
HasAttribute(String),
And(Vec<TargetFilter>),
Or(Vec<TargetFilter>),
Not(Box<TargetFilter>),
Raw(String),
}Expand description
Target filter for ACIs.
Conservatively partially ordered by “matches more entries” (wider = greater):
Allis greatestAndnarrows (more conjuncts = less coverage)Orwidens (more disjuncts = more coverage)Rawis incomparable with everything (opaque)- Different leaf variants are incomparable without schema knowledge
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
All
Match all entries
DnPattern(String)
Match DN pattern (supports wildcards)
ObjectClass(String)
Match entries with specific object class
HasAttribute(String)
Match entries with specific attribute
And(Vec<TargetFilter>)
Combination of filters (AND)
Or(Vec<TargetFilter>)
Combination of filters (OR)
Not(Box<TargetFilter>)
Negation filter — matches entries that do NOT match the inner filter
Raw(String)
Opaque LDAP filter string, passed through verbatim in generation.
Implementations§
Source§impl TargetFilter
impl TargetFilter
Sourcepub fn has_member_exclusion(&self, group_dn: &str) -> bool
pub fn has_member_exclusion(&self, group_dn: &str) -> bool
Whether this filter contains a !(memberOf=<group_dn>) negation
that excludes members of the given group.
Sourcepub fn has_filter_exclusion(&self, pattern: &str) -> bool
pub fn has_filter_exclusion(&self, pattern: &str) -> bool
Whether this filter contains a Not(inner) where inner matches
the given pattern (case-insensitive substring on Raw variants).
Generalizes has_member_exclusion to arbitrary filter negations,
e.g. has_filter_exclusion("ipaPermissionType=SYSTEM").
Trait Implementations§
Source§impl Clone for TargetFilter
impl Clone for TargetFilter
Source§fn clone(&self) -> TargetFilter
fn clone(&self) -> TargetFilter
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetFilter
impl Debug for TargetFilter
impl Eq for TargetFilter
Source§impl PartialEq for TargetFilter
impl PartialEq for TargetFilter
Source§impl PartialOrd for TargetFilter
impl PartialOrd for TargetFilter
impl StructuralPartialEq for TargetFilter
Auto Trait Implementations§
impl Freeze for TargetFilter
impl RefUnwindSafe for TargetFilter
impl Send for TargetFilter
impl Sync for TargetFilter
impl Unpin for TargetFilter
impl UnsafeUnpin for TargetFilter
impl UnwindSafe for TargetFilter
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.