Derive Macro rustc_macros::TypeFoldable

source ·
    // Attributes available to this derive:
Expand description

Derives TypeFoldable for the annotated struct or enum (union is not supported).

The fold will produce a value of the same struct or enum variant as the input, with each field respectively folded using the TypeFoldable implementation for its type. However, if a field of a struct or an enum variant is annotated with #[type_foldable(identity)] then that field will retain its incumbent value (and its type is not required to implement TypeFoldable).