Skip to main content

MastNodeExt

Derive Macro MastNodeExt 

Source
#[derive(MastNodeExt)]
{
    // Attributes available to this derive:
    #[mast_node_ext]
}
Expand description

Derive the MastNodeExt trait for an enum.

This macro automatically generates implementations for all methods in the MastNodeExt trait..

§Attributes

  • #[mast_node_ext(builder = "BuilderType")] - Specifies the builder type to use

§Example

use miden_utils_core_derive::MastNodeExt;

#[derive(MastNodeExt)]
#[mast_node_ext(builder = "MyBuilder")]
pub enum MyEnum {
    Variant1(Type1),
    Variant2(Type2),
    // ... other variants
}