如何确定每个crate提供了哪些“features”?

如何确定每个crate提供了哪些“features”?

你可以使用 cargo-feature crate 来查看和管理你的依赖特性:

> cargo install cargo-feature --locked

> cargo feature postgres

Avaliable features for `postgres`

array-impls = ["tokio-postgres/array-impls"]

with-bit-vec-0_6 = ["tokio-postgres/with-bit-vec-0_6"]

with-chrono-0_4 = ["tokio-postgres/with-chrono-0_4"]

with-eui48-0_4 = ["tokio-postgres/with-eui48-0_4"]

with-eui48-1 = ["tokio-postgres/with-eui48-1"]

with-geo-types-0_6 = ["tokio-postgres/with-geo-types-0_6"]

with-geo-types-0_7 = ["tokio-postgres/with-geo-types-0_7"]

with-serde_json-1 = ["tokio-postgres/with-serde_json-1"]

with-smol_str-01 = ["tokio-postgres/with-smol_str-01"]

with-time-0_2 = ["tokio-postgres/with-time-0_2"]

with-time-0_3 = ["tokio-postgres/with-time-0_3"]

with-uuid-0_8 = ["tokio-postgres/with-uuid-0_8"]

with-uuid-1 = ["tokio-postgres/with-uuid-1"]

注意:只有在包已经作为依赖项存在于 Cargo.toml 中时,此方法才有效。

在使用 cargo add 命令时,还会显示功能列表:

> cargo add postgres

Updating crates.io index

Adding postgres v0.19.4 to dependencies.

Features:

- array-impls

- with-bit-vec-0_6

- with-chrono-0_4

- with-eui48-0_4

- with-eui48-1

- with-geo-types-0_6

- with-geo-types-0_7

- with-serde_json-1

- with-smol_str-01

- with-time-0_2

- with-time-0_3

- with-uuid-0_8

- with-uuid-1

相关风雨

要怎么做才能登录到传说对决
be365

要怎么做才能登录到传说对决

🌊 07-09 💨 阅读 8607
群联低格程序下载
pc365buy

群联低格程序下载

🌊 07-21 💨 阅读 6106
如何关闭耳机线控
pc365buy

如何关闭耳机线控

🌊 07-25 💨 阅读 1735