2
ロケットを手に入れることができませんhandlebars example 未解決のインポートテンプレートロケットハンドルバーを構築するとき
[dependencies]
rocket = "*"
rocket_codegen = "*"
rocket_contrib = "*"
serde = "*"
serde_json = "*"
serde_derive = "*"
エラー:これらは私のCargo.toml依存関係です
error[E0432]: unresolved import `rocket_contrib::Template`
--> src\main.rs:29:5
|
29 | use rocket_contrib::Template;
| ^^^^^^^^^^^^^^^^^^^^^^^^ no `Template` in the root
error[E0599]: no method named `attach` found for type `rocket::Rocket` in the current scope
--> src\main.rs:62:10
|
62 | .attach(Template::fairing())
| ^^^^^^
最初のエラーがTemplate
を探し、それを見つけることができません。この例のgit repoには存在しません。この例はどのように機能しますか?私はmain.rsのRustコードが大丈夫だと確信しています、それは例と同じです。私はそれが唯一の依存問題だと思う。
error[E0599]: no method named `attach` found for type `rocket::Rocket` in the current scope
--> src\main.rs:62:10
|
62 | .attach(Template::fairing())
| ^^^^^^
error[E0599]: no associated item named `fairing` found for type `rocket_contrib::Template` in the current scope
--> src\main.rs:62:17
|
62 | .attach(Template::fairing())
| ^^^^^^^^^^^^^^^^^