Lines Matching full:derive

23 //! - **Derives** — Of particular interest to derive macros is
25 //! derive macro. An example below shows using this type in a library that can
26 //! derive implementations of a user-defined trait.
53 //! # Example of a derive macro
55 //! The canonical derive macro using Syn looks like this. We write an ordinary
57 //! the trait we are deriving. Any time that derive appears in the user's code,
99 //! of a derive macro. The example derives a `HeapSize` trait which computes an
111 //! The derive macro allows users to write `#[derive(HeapSize)]` on data
116 //! #[derive(HeapSize)]
136 //! #[derive(HeapSize)]
222 //! [Debugging Rust's new Custom Derive system][debugging].
224 //! [debugging]: https://quodlibetor.github.io/posts/debugging-rusts-new-custom-derive-system/
234 //! - **`derive`** *(enabled by default)* — Data structures for representing the
235 //! possible input to a derive macro, including structs and enums and types.
330 #[cfg(any(feature = "full", feature = "derive"))]
332 #[cfg(any(feature = "full", feature = "derive"))]
333 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
344 all(feature = "printing", any(feature = "full", feature = "derive")),
352 #[cfg(any(feature = "full", feature = "derive"))]
354 #[cfg(any(feature = "full", feature = "derive"))]
355 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
358 #[cfg(any(feature = "full", feature = "derive"))]
359 mod derive; module
360 #[cfg(feature = "derive")]
361 #[cfg_attr(docsrs, doc(cfg(feature = "derive")))]
362 pub use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
369 #[cfg(any(feature = "full", feature = "derive"))]
374 #[cfg(any(feature = "full", feature = "derive"))]
375 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
380 #[cfg(any(feature = "full", feature = "derive"))]
399 #[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
402 #[cfg(any(feature = "full", feature = "derive"))]
404 #[cfg(any(feature = "full", feature = "derive"))]
405 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
414 #[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
417 doc(cfg(all(any(feature = "full", feature = "derive"), feature = "printing")))
453 #[cfg(any(feature = "full", feature = "derive"))]
455 #[cfg(any(feature = "full", feature = "derive"))]
456 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
459 #[cfg(all(feature = "parsing", any(feature = "full", feature = "derive")))]
462 doc(cfg(all(feature = "parsing", any(feature = "full", feature = "derive"))))
466 #[cfg(any(feature = "full", feature = "derive"))]
468 #[cfg(any(feature = "full", feature = "derive"))]
469 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
491 #[cfg(any(feature = "full", feature = "derive"))]
493 #[cfg(any(feature = "full", feature = "derive"))]
494 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
501 any(feature = "full", feature = "derive"),
506 #[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
511 #[cfg(any(feature = "full", feature = "derive"))]
513 #[cfg(any(feature = "full", feature = "derive"))]
514 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
519 #[cfg(all(feature = "parsing", feature = "derive", not(feature = "full")))]
536 #[cfg(all(any(feature = "full", feature = "derive"), feature = "extra-traits"))]
539 #[cfg(any(feature = "full", feature = "derive"))]
541 #[cfg(any(feature = "full", feature = "derive"))]
542 #[cfg_attr(docsrs, doc(cfg(any(feature = "full", feature = "derive"))))]
549 #[cfg(all(any(feature = "full", feature = "derive"), feature = "parsing"))]