Hi, I'm trying to create an example that consists of multiple files, the structure is the next:
examples --fireworks ----app.rs ----firework.rs ----main.rs
app.rs contains a
pub trait App and in the firework.rs I'm trying to implement this trait. But I don't know how to refer to the App trait, what path to it is correct, and I get the error
maybe a missing crate 'app'.
It was quite easy to use the
Firework struct in the main.rs, I just
use crate::firework::Firework; but that doesn't work for the app.rs file neither in main.rs nor in firework.rs file.
I tried a dozen different methods like creating a mod.rs and declaring
pub mod app; inside, renaming files and example directory, creating a separate directory for the app.rs etc. but none of them worked.
I know the examples directory is not the best place for the App trait, I'll move it to the src soon but for now I'm just interested in how to make this particular case work.
Appreciate for help