- Is there some way to use
HttpClient
inDownloader
without making it public? - Is
super::...
the right way to do this?
// downloader/downloader.rs
use super::http_client::HttpClient;
pub struct Downloader {
client: HttpClient;
}
// downloader/http_client.rs
pub struct HttpClient {}
// downloader/mod.rs
mod http_client;
mod downloader;
pub use downloader::Downloader;