pub struct OperationSet(/* private fields */);Expand description
Normalized set of LDAP operations, stored as a bitflag.
All and SelfWrite are expanded at construction: All sets every concrete
operation bit, SelfWrite also sets Modify. This makes set operations
(union, intersection, containment) correct without special-casing.
Forms a bounded lattice under subset inclusion, with bitwise OR as join (union) and bitwise AND as meet (intersection).
Implementations§
Source§impl OperationSet
impl OperationSet
pub fn empty() -> Self
pub fn all() -> Self
pub fn contains(self, op: OperationType) -> bool
pub fn is_empty(self) -> bool
pub fn len(self) -> usize
pub fn insert(&mut self, op: OperationType)
pub fn union(self, other: Self) -> Self
pub fn intersection(self, other: Self) -> Self
pub fn difference(self, other: Self) -> Self
pub fn is_subset_of(self, other: Self) -> bool
pub fn is_superset_of(self, other: Self) -> bool
pub fn grants_write(self) -> bool
pub fn grants_read(self) -> bool
pub fn iter(self) -> OperationSetIter ⓘ
pub fn to_vec(self) -> Vec<OperationType>
Trait Implementations§
Source§impl Clone for OperationSet
impl Clone for OperationSet
Source§fn clone(&self) -> OperationSet
fn clone(&self) -> OperationSet
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for OperationSet
Source§impl Debug for OperationSet
impl Debug for OperationSet
Source§impl Display for OperationSet
impl Display for OperationSet
impl Eq for OperationSet
Source§impl From<&[OperationType]> for OperationSet
impl From<&[OperationType]> for OperationSet
Source§fn from(ops: &[OperationType]) -> Self
fn from(ops: &[OperationType]) -> Self
Converts to this type from the input type.
Source§impl From<OperationType> for OperationSet
impl From<OperationType> for OperationSet
Source§fn from(op: OperationType) -> Self
fn from(op: OperationType) -> Self
Converts to this type from the input type.
Source§impl FromIterator<OperationType> for OperationSet
impl FromIterator<OperationType> for OperationSet
Source§fn from_iter<I: IntoIterator<Item = OperationType>>(iter: I) -> Self
fn from_iter<I: IntoIterator<Item = OperationType>>(iter: I) -> Self
Creates a value from an iterator. Read more
Source§impl Hash for OperationSet
impl Hash for OperationSet
Source§impl JoinSemilattice for OperationSet
impl JoinSemilattice for OperationSet
Source§impl MeetSemilattice for OperationSet
impl MeetSemilattice for OperationSet
Source§impl Monoid for OperationSet
impl Monoid for OperationSet
Source§fn combine_all_with_identity<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = Self>,
fn combine_all_with_identity<I>(iter: I) -> Selfwhere
I: IntoIterator<Item = Self>,
Combine all elements from an iterator, using identity for empty iterators. Read more
Source§impl PartialEq for OperationSet
impl PartialEq for OperationSet
Source§impl PartialOrd for OperationSet
impl PartialOrd for OperationSet
Source§impl Semigroup for OperationSet
impl Semigroup for OperationSet
Source§fn combine_all<I>(iter: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
fn combine_all<I>(iter: I) -> Option<Self>where
I: IntoIterator<Item = Self>,
Combine all elements from an iterator. Read more
impl StructuralPartialEq for OperationSet
Auto Trait Implementations§
impl Freeze for OperationSet
impl RefUnwindSafe for OperationSet
impl Send for OperationSet
impl Sync for OperationSet
impl Unpin for OperationSet
impl UnsafeUnpin for OperationSet
impl UnwindSafe for OperationSet
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
Mutably borrows from an owned value. Read more
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
Compare self to
key and return true if they are equal.