[−][src]Crate syn_select
Library to get a specific element by path in Rust code.
Usage
ⓘThis code runs with edition 2018
let file: syn::File = syn::parse_str( r#" mod a { mod b { trait C { fn d(self) {} fn f() {} } } }"#).unwrap(); let results = syn_select::select("a::b::C::d", &file).unwrap(); assert_eq!(results.len(), 1);
Structs
Error | An error encountered while parsing or executing a selector. |
Functions
select | Parse a path, then search a file for all results that exactly match the specified path. |