Derive Macro Entity
Source #[derive(Entity)]
{
#[id]
#[graphite]
}
Expand description
Derive macro for entity types.
Generates Store trait implementation with load(), save(), and remove() methods.
§Example
ⓘ#[derive(Entity)]
pub struct Transfer {
#[id]
id: String,
from: Address,
to: Address,
value: BigInt,
}
The struct must have exactly one field marked with #[id].