Type Alias UnorderedPair

Source
pub type UnorderedPair<T> = UnorderedNTuple<T, 2>;
Expand description

An UnorderedPair is a special subtype of UnorderedNTuple for only 2 elements. This has been given its own type for ease of use.

It can also be converted to or from a tuple (similar impls for larger types will come once generics become stronger).

Aliased Type§

pub struct UnorderedPair<T>(pub [T; 2]);

Tuple Fields§

§0: [T; 2]

Trait Implementations§

Source§

impl<T> From<(T, T)> for UnorderedPair<T>

Source§

fn from(tuple: (T, T)) -> Self

Converts to this type from the input type.