Move语言社区

【Move进阶】Struct泛型

address 0x2{
module Box1 {
    struct Box1 {
        value: u64
    }

    struct Box2<T> {
        value: T
    }

    struct Box<T1:copy + drop, T2:copy + drop + store> has copy,drop {
	contents_1: T1,
	contents_2: T2,
    }
}
}