cargo build help 显示所有找到的实现
cargo build help show all found implementations
我在编译我的项目时遇到以下错误:=
= help: the following implementations were found:
<hyper::body::body::Body as std::convert::From<&'static [u8]>>
<hyper::body::body::Body as std::convert::From<&'static str>>
<hyper::body::body::Body as std::convert::From<bytes::bytes::Bytes>>
<hyper::body::body::Body as std::convert::From<std::borrow::Cow<'static, [u8]>>>
and 4 others
这没有帮助。我也想知道其他 4 个实现。我怎样才能让货物给我看?
我不知道有什么方法可以让 cargo 在这样的错误消息中显示更多详细信息,但是对于这种情况,您可以在 rustdoc 中找到相同的信息。如果您想查看 hyper 提供的实现,可以转到 trait implementations for Body on docs.rs 并注意那里的 From
实现。如果您还想包含其他 crate 或您自己的代码提供的实现,您可以在您的 crate 中使用 cargo doc --open
来生成和查看您的项目及其依赖项的文档,然后检查 [=12= 的特征实现]同理。
我在编译我的项目时遇到以下错误:=
= help: the following implementations were found:
<hyper::body::body::Body as std::convert::From<&'static [u8]>>
<hyper::body::body::Body as std::convert::From<&'static str>>
<hyper::body::body::Body as std::convert::From<bytes::bytes::Bytes>>
<hyper::body::body::Body as std::convert::From<std::borrow::Cow<'static, [u8]>>>
and 4 others
这没有帮助。我也想知道其他 4 个实现。我怎样才能让货物给我看?
我不知道有什么方法可以让 cargo 在这样的错误消息中显示更多详细信息,但是对于这种情况,您可以在 rustdoc 中找到相同的信息。如果您想查看 hyper 提供的实现,可以转到 trait implementations for Body on docs.rs 并注意那里的 From
实现。如果您还想包含其他 crate 或您自己的代码提供的实现,您可以在您的 crate 中使用 cargo doc --open
来生成和查看您的项目及其依赖项的文档,然后检查 [=12= 的特征实现]同理。