M
M
melovskih2016-03-29 13:56:06
Rust
melovskih, 2016-03-29 13:56:06

How to access one file from another in Rust?

There is the following file hierarchy:

├── src
│   ├── foo
│   │   ├── bar.rs
│   │   ├── baz.rs
│   │   └── mod.rs
│   └── main.rs

Is it possible to access structures from baz in bar?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Orlov, 2016-03-29
@melovskih

Add to bar.rs
mod baz;
usebase::*;
The idea is so.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question