Lines Matching defs:derive

21 //! - **Derives** — Of particular interest to derive macros is
23 //! derive macro. An example below shows using this type in a library that can
24 //! derive implementations of a user-defined trait.
51 //! # Example of a derive macro
53 //! The canonical derive macro using Syn looks like this. We write an ordinary
55 //! the trait we are deriving. Any time that derive appears in the user's code,
97 //! of a derive macro. The example derives a `HeapSize` trait which computes an
109 //! The derive macro allows users to write `#[derive(HeapSize)]` on data
114 //! #[derive(HeapSize)]
134 //! #[derive(HeapSize)]
222 //! [debugging]: https://quodlibetor.github.io/posts/debugging-rusts-new-custom-derive-system/
232 //! - **`derive`** *(enabled by default)* — Data structures for representing the
233 //! possible input to a derive macro, including structs and enums and types.
316 #[cfg(any(feature = "full", feature = "derive"))]
318 #[cfg(any(feature = "full", feature = "derive"))]
319 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
332 #[cfg(any(feature = "full", feature = "derive"))]
334 #[cfg(any(feature = "full", feature = "derive"))]
335 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
338 #[cfg(any(feature = "full", feature = "derive"))]
339 mod derive;
340 #[cfg(feature = "derive")]
341 #[cfg_attr(doc_cfg, doc(cfg(feature = "derive")))]
342 pub use crate::derive::{Data, DataEnum, DataStruct, DataUnion, DeriveInput};
349 #[cfg(any(feature = "full", feature = "derive"))]
354 #[cfg(any(feature = "full", feature = "derive"))]
355 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
360 #[cfg(any(feature = "full", feature = "derive"))]
379 #[cfg(any(feature = "full", feature = "derive"))]
381 #[cfg(any(feature = "full", feature = "derive"))]
382 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
388 #[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
391 doc(cfg(all(any(feature = "full", feature = "derive"), feature = "printing")))
425 #[cfg(any(feature = "full", feature = "derive"))]
427 #[cfg(any(feature = "full", feature = "derive"))]
428 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
431 #[cfg(all(feature = "parsing", any(feature = "full", feature = "derive")))]
434 doc(cfg(all(feature = "parsing", any(feature = "full", feature = "derive"))))
438 #[cfg(any(feature = "full", feature = "derive"))]
440 #[cfg(any(feature = "full", feature = "derive"))]
441 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
469 #[cfg(any(feature = "full", feature = "derive"))]
471 #[cfg(any(feature = "full", feature = "derive"))]
472 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
478 #[cfg(all(any(feature = "full", feature = "derive"), feature = "printing"))]
483 #[cfg(any(feature = "full", feature = "derive"))]
485 #[cfg(any(feature = "full", feature = "derive"))]
486 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
505 #[cfg(all(any(feature = "full", feature = "derive"), feature = "extra-traits"))]
508 #[cfg(any(feature = "full", feature = "derive"))]
510 #[cfg(any(feature = "full", feature = "derive"))]
511 #[cfg_attr(doc_cfg, doc(cfg(any(feature = "full", feature = "derive"))))]
518 #[cfg(all(any(feature = "full", feature = "derive"), feature = "parsing"))]
839 #[cfg(any(feature = "full", feature = "derive"))]