syn-select

Build Status Latest Version Documentation

Lightweight path selector for searching Rust code.

```rust mod a { mod b { trait C { fn d(self) {}

        fn f() {}
    }
}

}

fn main() { let srcfile = syn::parsestr(include_str!("./rs")).unwrap();

// This will print out the trait `C`, limited to only function `d`.
dbg!(syn_select::select("a::b::C::d", &src_file).unwrap());

} ```