pub struct CapSet<C: Capability + Ord>(/* private fields */);
Implementations§
Source§impl<C: Capability + Ord> CapSet<C>
impl<C: Capability + Ord> CapSet<C>
pub fn new(set: impl IntoIterator<Item = impl Into<C>>) -> Self
pub fn iter(&self) -> impl Iterator<Item = &C> + '_
pub fn is_empty(&self) -> bool
pub fn len(&self) -> usize
pub fn contains(&self, cap: impl Into<C>) -> bool
pub fn extend(&mut self, caps: impl IntoIterator<Item = impl Into<C>>)
pub fn insert(&mut self, cap: impl Into<C>) -> bool
pub fn from_strs<'a, E>(strs: impl IntoIterator<Item = &'a str>) -> Result<Self>
pub fn to_strings(&self) -> Vec<String>where
C: Display,
Trait Implementations§
Source§impl<'de, C> Deserialize<'de> for CapSet<C>where
C: Deserialize<'de> + Capability + Ord,
impl<'de, C> Deserialize<'de> for CapSet<C>where
C: Deserialize<'de> + Capability + Ord,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<C: Ord + Capability + Ord> Ord for CapSet<C>
impl<C: Ord + Capability + Ord> Ord for CapSet<C>
Source§impl<C: PartialOrd + Capability + Ord> PartialOrd for CapSet<C>
impl<C: PartialOrd + Capability + Ord> PartialOrd for CapSet<C>
impl<C: Eq + Capability + Ord> Eq for CapSet<C>
impl<C: Capability + Ord> StructuralPartialEq for CapSet<C>
Auto Trait Implementations§
impl<C> Freeze for CapSet<C>
impl<C> RefUnwindSafe for CapSet<C>where
C: RefUnwindSafe,
impl<C> Send for CapSet<C>where
C: Send,
impl<C> Sync for CapSet<C>where
C: Sync,
impl<C> Unpin for CapSet<C>
impl<C> UnwindSafe for CapSet<C>where
C: RefUnwindSafe,
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more