#[derive(ScryptoEncode)] { // Attributes available to this derive: #[sbor] }
Derives code for encoding a struct or enum with Scrypto value model.
use scrypto::prelude::*; #[derive(ScryptoEncode)] pub struct MyStruct { pub field_1: u32, pub field_2: String, }