pokeapi-macro
Attribute macro for pokeapi-model
.
Usage
Consider the following example:
```rust
use pokeapimacro::pokeapistruct;
[pokeapi_struct]
struct NamedAPIResource {
description: String,
url: String,
resourcetype: std::marker::PhantomData<*const T>,
}
```
This attribute will output the struct
with required derived traits and visibility:
```rust
[derive(Debug, Clone, PartialEq, Eq, Hash, serde::Serialize, serde::Deserialize)]
pub struct NamedAPIResource {
pub description: String,
pub url: String,
#[serde(skip)]
resourcetype: std::marker::PhantomData<*const T>
}
```