pub struct Set<T: ?Sized>(/* private fields */);Expand description
A (possibly infinite) set type.
Implementations§
Source§impl<T: ?Sized> Set<T>
impl<T: ?Sized> Set<T>
Sourcepub fn from_predicate(_: Mapping<T, bool>) -> Self
pub fn from_predicate(_: Mapping<T, bool>) -> Self
Build a set from a predicate, given as a Mapping.
⚠
Sourcepub fn contains(self, e: T) -> bool
pub fn contains(self, e: T) -> bool
Returns true if e is in the set.
(open, inline)
Self::mem(e, self)Sourcepub fn insert(self, e: T) -> Self
pub fn insert(self, e: T) -> Self
Returns a new set, where e has been added if it was not present.
(open, inline)
Self::add(e, self)Auto Trait Implementations§
impl<T> Freeze for Set<T>where
T: ?Sized,
impl<T> RefUnwindSafe for Set<T>where
T: RefUnwindSafe + ?Sized,
impl<T> Send for Set<T>
impl<T> Sync for Set<T>
impl<T> Unpin for Set<T>
impl<T> UnwindSafe for Set<T>where
T: UnwindSafe + ?Sized,
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