Trait dimensioned::array::ToGA [] [src]

pub trait ToGA {
    type Output;
    fn to_ga() -> Self::Output;

Implemented for TArr (a type-level array of type numbers), this gives the equivalent GenericArray.


extern crate dimensioned as dim;
extern crate generic_array;

use dim::typenum::consts::*;
type TArr = tarr![P3, P2, N5, N8, P2];

fn main() {
    use dim::array::ToGA;
    let x = TArr::to_ga();
    let y = arr![isize; 3, 2, -5, -8, 2];

    assert_eq!(x, y);

Associated Types

The type of the GenericArray to which we've converted

Required Methods

Create a GenericArray of integers from a TArr of type numbers.