![github]![crates-io]![docs-rs]
Build Status

retrieve

mod x and use x::* pattern syntax sugar of the proc-macro attribute.

I am tired of writing the mod x; use x::*; pattern over and over again for structured beatiful source code!😝 And I like the stylish attribute proc-macro style syntax sugars.💖

Example: examples/modpubuse/

  1. main.rs:

```rust use retrieve::*;

[modpubuse(x)] // <-- here!; it's the same as 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()); } ```

  1. x.rs:

```rust use retrieve::*;

[modpubuse(a, b)] // <-- here!; it's the same as mod a; pub use a::*; and mod b; pub use b::*;

pub struct X { pub a: i32, pub b: i32 } ```

for Debuggin

retrieve has print feature. It will be show a part of evaluated syntax:

eg. Run the example with print feature:

sh cargo run --example work_arround --features print

Then, you will get something like it in the build messages:

sh Compiling retrieve v1.0.1 (C:\Users\usagi\tmp\retrieve) [(proc-macro)retrieve::mod_pub_use+print] mod x; pub use x::*; fn main() { let x = X :: new(1) ; println! ("{:?} {:?}", x.a(), x.to_string()) ; } [(proc-macro)retrieve::mod_pub_use+print] mod a; pub use a::*; mod new; pub use new::*; mod _impl_already_traits; pub use _impl_already_traits::*; pub struct X { a : i32 } [(proc-macro)retrieve::mod_pub_use+print] mod display; pub use display::*; use super :: X ; Finished dev [unoptimized + debuginfo] target(s) in 1.41s Running `target\debug\examples\work_arround.exe` 1 "One!"

LICENSE

Author