pub trait VectorizedInto<T>: Sized {
    // Required method
    fn vectorized_into(self) -> T;
}
Expand description

Implementation of trait Into to vectorize into/from.

Standard From unfortunately is not autoimplemented for tuples and arrays and cant be implemented for them because of orphans restrictions. That how pair of traits VectorizedFrom/VectorizedInto could be useful. They are implemented for tuples and arrays. Their implementation is based on standard From, if From is implemented for elements of a tuple then VectorizedFrom/VectorizedInto implemented for collection containing them.

§Basic use-case.

use type_constructor::prelude::*;
types!( single Single1 : i32 );
let src = ( 1, 3 );
let got : ( Single1, Single1 ) = src.vectorized_into();

Required Methods§

source

fn vectorized_into(self) -> T

Performs the conversion.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<Target, Original> VectorizedInto<Target> for Original
where Target: VectorizedFrom<Original>,