Crates.io | upair |
lib.rs | upair |
version | 0.1.1 |
source | src |
created_at | 2022-04-25 20:58:33.922783 |
updated_at | 2022-04-26 15:56:59.948632 |
description | Unordered pair data structure. |
homepage | |
repository | https://github.com/AdrienDML/upair/ |
max_upload_size | |
id | 574087 |
size | 5,044 |
This data structure permits to have unordered pair keys for Hash based storage for example.
The inner Type needs to implement the Ord
trait.
let storage = HashSet::new();
storage.insert(UPair::new(1, 2));
assert!(storage.contains(UPair::new(2, 1));
Debug
if implemented by inner type.Copy
if implemented by inner type.Hash
if implemented by inner type.Eq, PartialEq
if implemented by inner type.Ord, PartialOrd
.From<(T, T)>
.From<[T; 2]>
.IntoIterator
.