[][src]Trait proc_macro_roids::DeriveInputDeriveExt

pub trait DeriveInputDeriveExt {
    fn append_derives(&mut self, derives: Punctuated<NestedMeta, Comma>);
}

Functions to make it ergonomic to work with struct ASTs.

Required methods

fn append_derives(&mut self, derives: Punctuated<NestedMeta, Comma>)

Appends derives to the list of derives.

Note: This can only be used with attribute macros, and not derive macros.

  • If the derive attribute does not exist, one will be created.
  • If the derive attribute exists, and there are existing derives that overlap with the derives to append, this macro will panic with the overlapping derives.
  • If the derive attribute exists, and there are no overlapping derives, then they will be combined.

Panics

Panics if there are existing derives that overlap with the derives to append.

Loading content...

Implementations on Foreign Types

impl DeriveInputDeriveExt for DeriveInput[src]

Loading content...

Implementors

Loading content...