├── Cargo.lock
├── Cargo.toml
├── src
│ └── model.rs
└── examples
└── client
└──mod.rs
I want to use a struct called Client
that exists in examples > client > mod.rs
in my model.rs
file. My package name is CratesTest
in the Cargo.toml
.
I tried this in my model.rs
:
extern crate CratesTest;
fn main() {
CratesTest::Client::new(/*snip*/)
}
I get the error:
error[E0433]: failed to resolve: could not find `Client` in `CratesTest`
let client = CratesTest::Client::new(...
^^^^^^ could not find `Client` in `CratesTest`
I also tried using mod client;
but it doesn't bring it into scope.