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: T1: TTrait 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
impl<Target, Original> Into2<Target> for Original where
Target: From2<Original>,
impl<Target, Original> Into2<Target> for Original where
Target: From2<Original>,
fn into2(self) -> Target
fn into2(self) -> Target
Performs the conversion.
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>
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
impl<R, P> ReadPrimitive<R> for P where
R: Read + ReadEndian<P>,
P: Default,
sourcefn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_little_endian().
sourcefn read_from_big_endian(read: &mut R) -> Result<Self, Error>
fn read_from_big_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_big_endian().
sourcefn read_from_native_endian(read: &mut R) -> Result<Self, Error>
fn read_from_native_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as ReadEndian::read_from_native_endian().
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.
