Attribute Macros§

  • Allows you to define a constructor function, inside the proc attribute you can customize the implementation by giving this information following attributes (Note every attribute is optional):

Derive Macros§

  • On structs it allows to Derive the From trait where a tuple of the fields are passed to the From::from, for example:
  • It derives TryFrom trait where a tuple of this struct’s fields are passed to the TryFrom::try_from function, for example