record_derive 0.2.6

Derive macro for blockify::Record trait
Documentation

Record - record_derive

A derive macro for the blockify::record::Record blockify.

Types deriving Record must implement Serialize + Deserialize

Usage

use blockify::record::Record;
use serde::{Serialize, Deserialize};

#[derive(Serialize, Deserialize, Record)]
pub struct MarriageContract {
  bride: String,
  groom: String,
}

#[derive(Serialize, Deserialize, Record)]
pub struct Detail<T> {
  val: T
}