This is documented in the Rust book, specifically the section on modules. When you have different modules, you need to bring items from the other modules into scope using the use
keyword.
mod query {
pub struct Query;
}
// Bring Query into scope
use query::Query;
struct Row(Vec<Query>);
fn main() {}
solved Use of undeclared type that is defined in another file