/// Test ensuring derivation works for newtype wrappers with transparent use concordium_std::*; /// Simple struct #[derive(SchemaType)] #[concordium(transparent)] struct MyStruct { field: u32, } /// Nested struct #[derive(SchemaType)] #[concordium(transparent)] struct MyOtherStruct { field: MyStruct, } /// With field attributes #[derive(SchemaType)] #[concordium(transparent)] struct MyCollection { #[concordium(size_length = 1)] field: Vec, } fn main() { { let schema_type = ::get_type(); assert_eq!(schema_type, schema::Type::U32); } { let schema_type = ::get_type(); assert_eq!(schema_type, schema::Type::U32); } { let schema_type = ::get_type(); assert_eq!( schema_type, schema::Type::List(schema::SizeLength::U8, Box::new(schema::Type::U32)) ); } }