Struct lattices::collections::SingletonSet
source · #[repr(transparent)]pub struct SingletonSet<T>(pub T);
Expand description
A wrapper around an item, representing a singleton set.
Tuple Fields§
§0: T
Trait Implementations§
source§impl<T: Clone> Clone for SingletonSet<T>
impl<T: Clone> Clone for SingletonSet<T>
source§fn clone(&self) -> SingletonSet<T>
fn clone(&self) -> SingletonSet<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<T> Collection for SingletonSet<T>
impl<T> Collection for SingletonSet<T>
source§impl<T> CollectionMut for SingletonSet<T>
impl<T> CollectionMut for SingletonSet<T>
source§type ItemMut<'a> = &'a mut T
where
Self: 'a
type ItemMut<'a> = &'a mut T where Self: 'a
Type of mutable references to items of the collection.
source§fn upcast_item_mut<'short, 'long: 'short>(
r: Self::ItemMut<'long>,
) -> Self::ItemMut<'short>where
Self: 'long,
fn upcast_item_mut<'short, 'long: 'short>(
r: Self::ItemMut<'long>,
) -> Self::ItemMut<'short>where
Self: 'long,
Changes an item mutable reference into a shorter lived mutable reference. Read more
source§impl<T> CollectionRef for SingletonSet<T>
impl<T> CollectionRef for SingletonSet<T>
source§type ItemRef<'a> = &'a <SingletonSet<T> as Collection>::Item
where
Self: 'a
type ItemRef<'a> = &'a <SingletonSet<T> as Collection>::Item where Self: 'a
Type of references to items of the collection.
source§fn upcast_item_ref<'short, 'long: 'short>(
r: Self::ItemRef<'long>,
) -> Self::ItemRef<'short>where
Self: 'long,
fn upcast_item_ref<'short, 'long: 'short>(
r: Self::ItemRef<'long>,
) -> Self::ItemRef<'short>where
Self: 'long,
Changes an item reference into a shorter lived reference. Read more
source§impl<T: Debug> Debug for SingletonSet<T>
impl<T: Debug> Debug for SingletonSet<T>
source§impl<'de, T> Deserialize<'de> for SingletonSet<T>where
T: Deserialize<'de>,
impl<'de, T> Deserialize<'de> for SingletonSet<T>where
T: Deserialize<'de>,
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<T> From<T> for SingletonSet<T>
impl<T> From<T> for SingletonSet<T>
source§impl<'a, Q, T> Get<&'a Q> for SingletonSet<T>
impl<'a, Q, T> Get<&'a Q> for SingletonSet<T>
source§impl<'a, Q, T> GetMut<&'a Q> for SingletonSet<T>
impl<'a, Q, T> GetMut<&'a Q> for SingletonSet<T>
source§impl<T: Hash> Hash for SingletonSet<T>
impl<T: Hash> Hash for SingletonSet<T>
source§impl<T> IntoIterator for SingletonSet<T>
impl<T> IntoIterator for SingletonSet<T>
source§impl<T> Iter for SingletonSet<T>
impl<T> Iter for SingletonSet<T>
source§impl<T> IterMut for SingletonSet<T>
impl<T> IterMut for SingletonSet<T>
source§impl<T> Len for SingletonSet<T>
impl<T> Len for SingletonSet<T>
source§impl<T: Ord> Ord for SingletonSet<T>
impl<T: Ord> Ord for SingletonSet<T>
source§fn cmp(&self, other: &SingletonSet<T>) -> Ordering
fn cmp(&self, other: &SingletonSet<T>) -> Ordering
1.21.0 · 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
source§impl<T: PartialEq> PartialEq for SingletonSet<T>
impl<T: PartialEq> PartialEq for SingletonSet<T>
source§impl<T: PartialOrd> PartialOrd for SingletonSet<T>
impl<T: PartialOrd> PartialOrd for SingletonSet<T>
source§impl<T> Serialize for SingletonSet<T>where
T: Serialize,
impl<T> Serialize for SingletonSet<T>where
T: Serialize,
source§impl<T> SimpleCollectionRef for SingletonSet<T>
impl<T> SimpleCollectionRef for SingletonSet<T>
impl<T: Copy> Copy for SingletonSet<T>
impl<T: Eq> Eq for SingletonSet<T>
impl<T> StructuralPartialEq for SingletonSet<T>
Auto Trait Implementations§
impl<T> Freeze for SingletonSet<T>where
T: Freeze,
impl<T> RefUnwindSafe for SingletonSet<T>where
T: RefUnwindSafe,
impl<T> Send for SingletonSet<T>where
T: Send,
impl<T> Sync for SingletonSet<T>where
T: Sync,
impl<T> Unpin for SingletonSet<T>where
T: Unpin,
impl<T> UnwindSafe for SingletonSet<T>where
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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)§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