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: T1
§1: T2
Trait Implementations§
Source§impl<T1, T2, Into1, Into2> From<(Into1, Into2)> for Pair<T1, T2>
impl<T1, T2, Into1, Into2> From<(Into1, Into2)> for Pair<T1, T2>
Source§fn from(src: (Into1, Into2)) -> Pair<T1, T2>
fn from(src: (Into1, Into2)) -> Pair<T1, T2>
Converts to this type from the input type.
impl<T1, T2> Eq for Pair<T1, T2>
impl<T1, T2> StructuralPartialEq for Pair<T1, T2>
Auto Trait Implementations§
impl<T1, T2> Freeze for Pair<T1, T2>
impl<T1, T2> RefUnwindSafe for Pair<T1, T2>where
T1: RefUnwindSafe,
T2: RefUnwindSafe,
impl<T1, T2> Send for Pair<T1, T2>
impl<T1, T2> Sync for Pair<T1, T2>
impl<T1, T2> Unpin for Pair<T1, T2>
impl<T1, T2> UnwindSafe for Pair<T1, T2>where
T1: UnwindSafe,
T2: 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§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<Target, Original> VectorizedInto<Target> for Originalwhere
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Originalwhere
Target: VectorizedFrom<Original>,
Source§fn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.