Crate sized_data_derive

Crate sized_data_derive 

Source
Expand description

Procedural macro implementation for the sized-data crate.

This crate provides the derive macro for automatically implementing the SizedData trait on structs. Used primarily with Anchor framework for Solana programs.

§Example

use sized_data_derive::SizedData;
use anchor_lang::prelude::*;

#[derive(SizedData)]
pub struct UserAccount {
    pub authority: Pubkey,
    pub counter: u64,
}

Derive Macros§

SizedData
Derives the SizedData trait for structs.