I'm stuck when learning how to access a module. I'm trying to insert a folder other than src
into src
. It's not working and it gives me an error. Here this is my project tree.
$ Project1
.
|-- src
| |-- main.rs
| |--FolderinSrcFolder
| |--folderinsrcmodule.rs
|
|--anothersrc
| |--mod.rs
|
|-- rootmodule.rs
|-- Cargo.toml
|-- Cargo.lock
How can I access anothersrc/mod.rs
src/main.rs
? How can I access rootmodule.rs
from src/main.rs
?
I already read the Rust documentation.