Struct type_constructor::pair::Pair
source · [−]pub struct Pair<T1, T2>(pub T1, pub T2);Expand description
Type constructor to wrap two types into a tuple.
Sample
let i32_and_f32_in_tuple = type_constructor::Pair::< i32, f32 >::from( ( 13, 13.0 ) );
dbg!( i32_and_f32_in_tuple );
// vec_of_i32_in_tuple = Pair( 13, 13.0 )Tuple Fields
0: T11: T2Trait Implementations
sourceimpl<T1, T2, Into1: Into<T1>, Into2: Into<T2>> From<(Into1, Into2)> for Pair<T1, T2>
impl<T1, T2, Into1: Into<T1>, Into2: Into<T2>> From<(Into1, Into2)> for Pair<T1, T2>
sourcefn from(src: (Into1, Into2)) -> Self
fn from(src: (Into1, Into2)) -> Self
Converts to this type from the input type.
impl<T1: Eq, T2: Eq> Eq for Pair<T1, T2>
impl<T1, T2> StructuralEq for Pair<T1, T2>
impl<T1, T2> StructuralPartialEq for Pair<T1, T2>
Auto Trait Implementations
impl<T1, T2> RefUnwindSafe for Pair<T1, T2> where
T1: RefUnwindSafe,
T2: RefUnwindSafe,
impl<T1, T2> Send for Pair<T1, T2> where
T1: Send,
T2: Send,
impl<T1, T2> Sync for Pair<T1, T2> where
T1: Sync,
T2: Sync,
impl<T1, T2> Unpin for Pair<T1, T2> where
T1: Unpin,
T2: Unpin,
impl<T1, T2> UnwindSafe for Pair<T1, T2> where
T1: UnwindSafe,
T2: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
