Struct test_tools::prelude::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: T1§1: T2Trait Implementations§
source§impl<T1, T2, Into1, Into2> From<(Into1, Into2)> for Pair<T1, T2>where
Into1: Into<T1>,
Into2: Into<T2>,
impl<T1, T2, Into1, Into2> From<(Into1, Into2)> for Pair<T1, T2>where Into1: Into<T1>, Into2: Into<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.
source§impl<T1, T2> PartialEq for Pair<T1, T2>where
T1: PartialEq,
T2: PartialEq,
impl<T1, T2> PartialEq for Pair<T1, T2>where T1: PartialEq, T2: PartialEq,
impl<T1, T2> Eq for Pair<T1, T2>where T1: Eq, T2: Eq,
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§
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<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.