enum Value {
NULL,
Bytes(Vec<u8>),
Int(i64),
UInt(u64),
Float(f64),
Date(u16, u8, u8, u8, u8, u8, u32),
Time(bool, u32, u8, u8, u8, u32),
}
let mut data :HashMap<&str, Value> = HashMap::new();
let mut query = self.pool.prep_exec(sql,()).unwrap();
let row = query.next().unwrap().unwrap();
for (k,_) in query.column_indexes().iter(){
let v2: Value = row.get::<Value,&str>(k).unwrap();
data.insert(k,v2);
}
提示 v2 的生命周期不够长 咋整?