use daml::prelude::*; #[DamlData] pub struct InnerType { name: DamlText, boxed_outer: DamlOptional>, outer: DamlOptional, } #[DamlData] pub struct BoxedOuterType { name: DamlText, inner: InnerType, } #[DamlData] pub struct OuterType { name: DamlText, inner: Box, } #[DamlVariant] pub enum MyList { Val(String), Cons(ListItem), } #[DamlData] pub struct ListItem { value: String, cons: Box, } #[DamlData] pub struct GenericStruct { value: T, cons: DamlOptional>>, } #[DamlVariant] pub enum GenericVariant { Base(T), Cons(Box>), } #[DamlData] pub struct GenericData { value: T, } #[DamlData] pub struct ConcreteData { data_1: GenericData, data_2: DamlOptional>>, }