I have such a directory structure:
structs
-book.rs
main.rs
I just read about modules and am trying to import a structure from book.rs in main:
book.rs
#[derive(Debug)]
pub struct book{
pub title:u32
}
main.rs
mod book;
fn main() {
print!("start")
}
And this causes an error: unresolved module, can't find module file: book.rs , or book/mod.rs
I tried in different ways, but it doesn't work out. I will be glad of help to understand what the error is.