reflectx 0.0.1

tools for performing value/type reflection with zinq types.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#![allow(unused)]

use std::collections::HashMap;

use reflectx::{ToType, TypeOf, type_of, value_of};
use reflectx_macros::*;

#[derive(Debug, Clone, Reflect)]
pub struct Tester(HashMap<u8, i8>);

#[test]
pub fn should_reflect_map() {
    let ty = type_of!(Tester).to_struct();
    let inner = &ty.fields()[0];

    assert_eq!(inner.ty(), &type_of!(HashMap<u8, i8>));
}