特质`postgres :: types :: FromSql`没有为`bit_vec :: BitVec`实现

时间:2019-06-26 09:49:53

标签: postgresql rust

我具有以下数据结构

#[derive(Serialize, Debug)]
pub struct TestEvent {
    id: i32,
    event_mask: bit_vec::BitVec
}

从数据库中获取该字段的值时,我得到了

错误
the trait `postgres::types::FromSql` is not implemented for `bit_vec::BitVec`

FromSql standard提到特质需要 通过我启用的位vec启用

postgres = { version = "0.14", features = ["with-chrono", "with-bit-vec"] }
bit-vec = {version = "0.6.1", features = ["serde"]}

仍然出现同样的错误。

我有cross-posted this to the user's forum

0 个答案:

没有答案