pub struct HomoPair<T>(pub T, pub T);
Expand description
Type constructor to wrap pair of the same type.
Sample
let two_i32_in_tuple = type_constructor::HomoPair::< i32 >::from( ( 13, 31 ) );
dbg!( two_i32_in_tuple );
// vec_of_i32_in_tuple = HomoPair( 13, 31 )
Tuple Fields
0: T
1: T
Trait Implementations
sourceimpl<T> CloneAsArray<T, 2_usize> for HomoPair<T> where
T: Clone,
impl<T> CloneAsArray<T, 2_usize> for HomoPair<T> where
T: Clone,
sourcefn clone_as_array(&self) -> [T; 2]
fn clone_as_array(&self) -> [T; 2]
Clone as array.
sourceimpl<T> CloneAsTuple<(T, T)> for HomoPair<T> where
T: Clone,
impl<T> CloneAsTuple<(T, T)> for HomoPair<T> where
T: Clone,
sourcefn clone_as_tuple(&self) -> (T, T)
fn clone_as_tuple(&self) -> (T, T)
Clone as tuple.
impl<T> Eq for HomoPair<T> where
T: Eq,
impl<T> StructuralEq for HomoPair<T>
impl<T> StructuralPartialEq for HomoPair<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for HomoPair<T> where
T: RefUnwindSafe,
impl<T> Send for HomoPair<T> where
T: Send,
impl<T> Sync for HomoPair<T> where
T: Sync,
impl<T> Unpin for HomoPair<T> where
T: Unpin,
impl<T> UnwindSafe for HomoPair<T> where
T: 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
sourceimpl<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>
sourceimpl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
impl<Target, Original> VectorizedInto<Target> for Original where
Target: VectorizedFrom<Original>,
sourcefn vectorized_into(self) -> Target
fn vectorized_into(self) -> Target
Performs the conversion.