![github] ![crates-io] ![docs-rs]
mod x
and use x::*
pattern syntax sugar of the proc-macro attribute.
retrieve::
mod_use
=> mod x; use x::*;
for a module internal.pub_mod_use
=> pub mod x; use x::*
for a public nested modules.mod_pub_use
=> mod x; pub use x::*
for a public flatten modules with separated source writting.pub_mod_pub_use
=> pub x; pub use x::x
for a public nested modules with flatten alias in the root.I am tired of writing the "xxx" pattern over and over again for structured beatiful source code!😝 And I like the stylish attribute proc-macro style syntax sugars.💖
crate::x::a::*
crate::x::b::*
```rust use retrieve::*;
mod x; pub use x::*;
fn main()
{
// X
from x::X
let x = X {
a: 1,
b: 2
};
// And it from '2. x.rs'; .a()
from the trait of x::a::A
and .b()
from the trait of x::b::B
println!("{:?}", x.a() + x.b());
}
```
```rust use retrieve::*;
mod a; pub use a::*;
and mod b; pub use b::*;
pub struct X { pub a: i32, pub b: i32 } ```