gpt4 book ai didi

rust - cargo build 帮助显示所有找到的实现

转载 作者:行者123 更新时间:2023-12-03 11:45:10 34 4
gpt4 key购买 nike

编译项目时出现以下错误:=

= 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 给我看?

最佳答案

我不知道有什么方法可以使 cargo 在类似的错误消息中显示更多详细信息,但是在这种情况下,您可以在rustdoc中找到相同的信息。如果要查看hyper提供的实现,可以转到trait implementations for Body on docs.rs并在此处记录From的实现。如果还希望包括其他包装箱或您自己的代码提供的实现,则可以在包装箱中使用cargo doc --open生成并查看项目及其依赖项的文档,然后以相同的方式检查Body的特征实现。

关于rust - cargo build 帮助显示所有找到的实现,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62852128/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com