pokeapi-macro 1.0.0

Attribute macro for `pokeapi-model` structs.
Documentation

Usage

All API bindings in pokeapi-model must be Debug, Clone, PartialEq, and Deserialize, as well as have pub visibility.

Consider the following example:

use pokeapi-macro::pokeapi_struct;

#[pokeapi_struct]
struct NamedAPIResource {
  description: String,
  url: String,
}

This attribute will output the struct with required derived traits and visibility:

#[derive(Debug, Clone, PartialEq, Eq, Deserialize)]
pub struct NamedAPIResource {
  pub description: String,
  pub url: String,
}