pub struct Pair<A, B>(pub A, pub B);
Expand description
Wraps two values.
Tuple Fields§
§0: A
§1: B
Trait Implementations§
Source§impl<First, Second> Brand1<Pair<First, Second>, First> for PairWithSecondBrand<Second>
impl<First, Second> Brand1<Pair<First, Second>, First> for PairWithSecondBrand<Second>
Source§impl<First, Second> Brand1<Pair<First, Second>, Second> for PairWithFirstBrand<First>
impl<First, Second> Brand1<Pair<First, Second>, Second> for PairWithFirstBrand<First>
Source§impl<A: Ord, B: Ord> Ord for Pair<A, B>
impl<A: Ord, B: Ord> Ord for Pair<A, B>
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<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
impl<A: PartialOrd, B: PartialOrd> PartialOrd for Pair<A, B>
impl<A: Copy, B: Copy> Copy for Pair<A, B>
impl<A: Eq, B: Eq> Eq for Pair<A, B>
impl<A, B> StructuralPartialEq for Pair<A, B>
Auto Trait Implementations§
impl<A, B> Freeze for Pair<A, B>
impl<A, B> RefUnwindSafe for Pair<A, B>where
A: RefUnwindSafe,
B: RefUnwindSafe,
impl<A, B> Send for Pair<A, B>
impl<A, B> Sync for Pair<A, B>
impl<A, B> Unpin for Pair<A, B>
impl<A, B> UnwindSafe for Pair<A, B>where
A: UnwindSafe,
B: 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