# syn-select
[](https://travis-ci.org/TedDriggs/syn-select)
[](https://crates.io/crates/syn-select)
[](https://docs.rs/syn-select)
Lightweight path selector for searching Rust code.
```rust
mod a {
mod b {
trait C {
fn d(self) {}
fn f() {}
}
}
}
fn main() {
let src_file = syn::parse_str(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());
}
```
# Wildcards
Using `_` as a path segment in a wildcard will match any element in that position.
For example, in the following:
```rust
mod imp {
struct H;
}
mod imp2 {
struct H;
}
```
The selector `_::H` would match both structs named `H`.