1# syn-mid 2 3[](https://crates.io/crates/syn-mid) 4[](https://docs.rs/syn-mid) 5[](#license) 6[](https://www.rust-lang.org) 7[](https://github.com/taiki-e/syn-mid/actions) 8 9<!-- tidy:crate-doc:start --> 10Providing the features between "full" and "derive" of syn. 11 12This crate provides the following two unique data structures. 13 14- [`syn_mid::ItemFn`] -- A function whose body is not parsed. 15 16 ```text 17 fn process(n: usize) -> Result<()> { ... } 18 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^ ^ 19 ``` 20 21- [`syn_mid::Block`] -- A block whose body is not parsed. 22 23 ```text 24 { ... } 25 ^ ^ 26 ``` 27 28Other data structures are the same as data structures of [syn]. These are 29defined in this crate because they cannot be used in [syn] without "full" 30feature. 31 32## Usage 33 34Add this to your `Cargo.toml`: 35 36```toml 37[dependencies] 38syn-mid = "0.5" 39``` 40 41*Compiler support: requires rustc 1.56+* 42 43[**Examples**](https://github.com/taiki-e/syn-mid/tree/HEAD/examples) 44 45## Optional features 46 47- **`clone-impls`** — Clone impls for all syntax tree types. 48 49[syn]: https://github.com/dtolnay/syn 50 51<!-- tidy:crate-doc:end --> 52 53[`syn_mid::Block`]: https://docs.rs/syn-mid/latest/syn_mid/struct.Block.html 54[`syn_mid::ItemFn`]: https://docs.rs/syn-mid/latest/syn_mid/struct.ItemFn.html 55 56## License 57 58Licensed under either of [Apache License, Version 2.0](LICENSE-APACHE) or 59[MIT license](LICENSE-MIT) at your option. 60 61Unless you explicitly state otherwise, any contribution intentionally submitted 62for inclusion in the work by you, as defined in the Apache-2.0 license, shall 63be dual licensed as above, without any additional terms or conditions. 64