web3我正在使用板条箱中的类型,web3::contract::Contract<web3::transports::Http>. 编译器抱怨E0277:
$ cargo run
Compiling proj v0.1.0 (/home/user/proj)
error[E0277]: the trait bound `web3::contract::Contract<web3::transports::Http>: Default` is not satisfied
--> src/book.rs:38:5
|
38 | / #[serde(skip)]
39 | | abi: web3::contract::Contract<OMETransport>,
| |_______________________________________________^ the trait `Default` is not implemented for `web3::contract::Contract<web3::transports::Http>`
|
= note: required by `std::default::Default::default`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: could not compile `proj`
To learn more, run the command again …Run Code Online (Sandbox Code Playgroud)