macro_rules! make_table_field_map {
    ($vec_ref:expr,$($field_name:ident$(.)?)+) => { ... };
}
Expand description

Gets the HashMap collection of member attributes of the target Vec vec_ref: vec reference,field_name: the field name of the structure

need impl Clone or #[derive(Clone, Debug)] for example: struct SysUserRole{ pub role_id:String } let user_roles: Vec; let role_ids = make_table_field_map!(&user_roles,role_id); // role_ids: HashMap<String,SysUserRole>