NegatableSet

Struct NegatableSet 

Source
pub struct NegatableSet<I> { /* private fields */ }

Implementations§

Source§

impl<I: MutableSet + Default> NegatableSet<I>

Source

pub fn constant(value: bool) -> Self

Source

pub fn empty() -> Self

Source

pub fn all() -> Self

Source§

impl<I: MutableSet> NegatableSet<I>

Source

pub fn is_empty(&self) -> bool

Source

pub fn is_all(&self) -> bool

Source

pub fn into_elements(self) -> I

Source

pub fn elements(&self) -> &I

Source

pub fn elements_mut(&mut self) -> &mut I

Source§

impl<I: MutableSet> NegatableSet<I>

Source

pub fn contains(&self, value: &I::Item) -> bool

Source

pub fn insert(&mut self, that: I::Item)

Source

pub fn is_superset(&self, that: &Self) -> bool

Source

pub fn is_subset(&self, that: &Self) -> bool

Source

pub fn is_disjoint(&self, that: &Self) -> bool

Source§

impl<I: MutableSet> NegatableSet<I>
where I::Item: Ord + Clone,

Source

pub fn remove(&mut self, that: &I::Item)

Trait Implementations§

Source§

impl<'a, I: MutableSet + 'a> BitAnd for &'a NegatableSet<I>
where &'a I: BitAnd<Output = I> + BitOr<Output = I> + Sub<Output = I>,

Source§

type Output = NegatableSet<I>

The resulting type after applying the & operator.
Source§

fn bitand(self, that: Self) -> Self::Output

Performs the & operation. Read more
Source§

impl<I> BitAndAssign for NegatableSet<I>

Source§

fn bitand_assign(&mut self, that: Self)

Performs the &= operation. Read more
Source§

impl<'a, I: MutableSet> BitOr for &'a NegatableSet<I>
where &'a I: BitAnd<Output = I> + BitOr<Output = I> + Sub<Output = I>,

Source§

type Output = NegatableSet<I>

The resulting type after applying the | operator.
Source§

fn bitor(self, that: Self) -> Self::Output

Performs the | operation. Read more
Source§

impl<I> BitOrAssign for NegatableSet<I>

Source§

fn bitor_assign(&mut self, that: Self)

Performs the |= operation. Read more
Source§

impl<'a, I: MutableSet> BitXor for &'a NegatableSet<I>
where &'a I: BitXor<Output = I>,

Source§

type Output = NegatableSet<I>

The resulting type after applying the ^ operator.
Source§

fn bitxor(self, that: Self) -> Self::Output

Performs the ^ operation. Read more
Source§

impl<I> BitXorAssign for NegatableSet<I>

Source§

fn bitxor_assign(&mut self, that: Self)

Performs the ^= operation. Read more
Source§

impl<I: Clone> Clone for NegatableSet<I>

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<I: MutableSet> Debug for NegatableSet<I>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<I: Default> Default for NegatableSet<I>

Source§

fn default() -> NegatableSet<I>

Returns the “default value” for a type. Read more
Source§

impl<'de, A> Deserialize<'de> for NegatableSet<A>
where A: MutableSet + Deserialize<'de>,

Source§

fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>

Deserialize this value from the given Serde deserializer. Read more
Source§

impl<I: MutableSet> From<I> for NegatableSet<I>

Source§

fn from(value: I) -> Self

Converts to this type from the input type.
Source§

impl<I: MutableSet + Default> From<bool> for NegatableSet<I>

Source§

fn from(value: bool) -> Self

Converts to this type from the input type.
Source§

impl<I: Hash> Hash for NegatableSet<I>

Source§

fn hash<H: Hasher>(&self, state: &mut H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl<'a, I: MutableSet + Clone> Not for &'a NegatableSet<I>

Source§

type Output = NegatableSet<I>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<I: MutableSet + Clone> Not for NegatableSet<I>

Source§

type Output = NegatableSet<I>

The resulting type after applying the ! operator.
Source§

fn not(self) -> Self::Output

Performs the unary ! operation. Read more
Source§

impl<I: PartialEq> PartialEq for NegatableSet<I>

Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<A> Serialize for NegatableSet<A>
where A: MutableSet + Serialize,

Source§

fn serialize<S: Serializer>(&self, serializer: S) -> Result<S::Ok, S::Error>

Serialize this value into the given Serde serializer. Read more
Source§

impl<'a, I: MutableSet> Sub for &'a NegatableSet<I>
where &'a I: BitAnd<Output = I> + BitOr<Output = I> + Sub<Output = I>,

Source§

type Output = NegatableSet<I>

The resulting type after applying the - operator.
Source§

fn sub(self, that: Self) -> Self::Output

Performs the - operation. Read more
Source§

impl<I> SubAssign for NegatableSet<I>

Source§

fn sub_assign(&mut self, that: Self)

Performs the -= operation. Read more
Source§

impl<I: Eq> Eq for NegatableSet<I>

Auto Trait Implementations§

§

impl<I> Freeze for NegatableSet<I>
where I: Freeze,

§

impl<I> RefUnwindSafe for NegatableSet<I>
where I: RefUnwindSafe,

§

impl<I> Send for NegatableSet<I>
where I: Send,

§

impl<I> Sync for NegatableSet<I>
where I: Sync,

§

impl<I> Unpin for NegatableSet<I>
where I: Unpin,

§

impl<I> UnwindSafe for NegatableSet<I>
where I: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,