Move语言社区

【Move进阶】Struct使用

address 0x2 {
module StructExample1 {
    use 0x1::STC::STC;

    struct Empty{}

    struct MyStruct {
	address_field: address,
	bool_field: bool,
	u64_field: u64,
        vec_field: vector<u8>,
	inner_field: Empty,
	coins: STC,
    }
}
}