├── Cargo.lock
├── Cargo.toml
├── src
│ └── model.rs
└── examples
└── client
└──mod.rs
我想使用Client
文件中examples > client > mod.rs
中存在的名为model.rs
的结构。我的包裹名称是CratesTest
中的Cargo.toml
。
我在model.rs
中尝试过:
extern crate CratesTest;
fn main() {
CratesTest::Client::new(/*snip*/)
}
我得到了错误:
error[E0433]: failed to resolve: could not find `Client` in `CratesTest`
let client = CratesTest::Client::new(...
^^^^^^ could not find `Client` in `CratesTest`
我也尝试使用mod client;
,但它没有将其纳入范围。