有时,当您遇到错误时,例如关于其他类型实现特征的错误,您会看到如下错误消息:
error[E0277]: the trait bound `Vec<u8>: ToHeader` is not satisfied
--> src/main.rs:3:35
|
3 | #[derive(Clone, Debug, PartialEq, NewType)]
| ^^^^^^^ the trait `ToHeader` is not implemented for `Vec<u8>`
|
= help: the following other types implement trait `ToHeader`:
&T
Arc<T>
Box<T>
HexEncodedBytes
MaybeUndefined<T>
Uri
bool
f32
and 13 others
= note: this error originates in the derive macro `NewType` (in Nightly builds, run with -Z macro-backtrace for more info)
Run Code Online (Sandbox Code Playgroud)
我如何才能看到上面示例中的其他 13 个?我已经尝试过-vv,但没有成功,并且在帮助消息中看不到任何其他内容。
您可以使用以下代码重现此内容:
# Cargo.toml
[dependencies]
poem …Run Code Online (Sandbox Code Playgroud)