Struct Set
pub struct Set<T>(pub(crate) GcCow<HashSet<T>>)
where
T: Obj;Expand description
Garbage-collected hash set implementing Copy.
This implements Ord but the order is not meaningful; this is just so one can use BTreeMaps.
In particular, the order might differ across two runs of the same program.
Tuple Fields§
§0: GcCow<HashSet<T>>Implementations§
Trait Implementations§
impl<T> Copy for Set<T>where
T: Copy + Obj,
§impl<'de, T> Deserialize<'de> for Set<T>where
T: Obj + Deserialize<'de>,
impl<'de, T> Deserialize<'de> for Set<T>where
T: Obj + Deserialize<'de>,
§fn deserialize<D>(
deserializer: D,
) -> Result<Set<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
fn deserialize<D>(
deserializer: D,
) -> Result<Set<T>, <D as Deserializer<'de>>::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl<T> Eq for Set<T>where
T: Eq + Obj,
§impl<U> FromIterator<U> for Set<U>where
U: Obj,
impl<U> FromIterator<U> for Set<U>where
U: Obj,
§fn from_iter<T>(iter: T) -> Set<U>where
T: IntoIterator<Item = U>,
fn from_iter<T>(iter: T) -> Set<U>where
T: IntoIterator<Item = U>,
Creates a value from an iterator. Read more
§impl<T> IntoIterator for Set<T>where
T: Obj,
impl<T> IntoIterator for Set<T>where
T: Obj,
§impl<T> Ord for Set<T>where
T: Ord + Obj,
impl<T> Ord for Set<T>where
T: Ord + Obj,
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
§impl<T> PartialOrd for Set<T>where
T: PartialOrd + Obj,
impl<T> PartialOrd for Set<T>where
T: PartialOrd + Obj,
§impl<T> Serialize for Set<T>where
T: Serialize + Obj,
impl<T> Serialize for Set<T>where
T: Serialize + Obj,
§fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
fn serialize<S>(
&self,
serializer: S,
) -> Result<<S as Serializer>::Ok, <S as Serializer>::Error>where
S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl<T> StructuralPartialEq for Set<T>where
T: PartialEq + Obj,
Auto Trait Implementations§
impl<T> !Send for Set<T>
impl<T> !Sync for Set<T>
impl<T> Freeze for Set<T>
impl<T> RefUnwindSafe for Set<T>where
GcCow<HashSet<T>>: RefUnwindSafe,
impl<T> Unpin for Set<T>
impl<T> UnsafeUnpin for Set<T>where
GcCow<HashSet<T>>: UnsafeUnpin,
impl<T> UnwindSafe for Set<T>where
GcCow<HashSet<T>>: UnwindSafe,
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
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
§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
§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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more