Guest User

Untitled

a guest
Apr 26th, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. // data/something.rs
  2. pub struct MyStruct {
  3. pub id: u32, // public property
  4. value: u32, // can not be used outsode of something.rs
  5. }
  6.  
  7. // data/mod.rs
  8. pub mod something; // <-- this exposes data::something to anything "using" data
  9.  
  10. // main.rs
  11.  
  12. mod data;
  13.  
  14. use data::something::MyStruct;
  15.  
  16. fn main() {
  17. }
Add Comment
Please, Sign In to add comment