基本类型默认有下面4个能力吗
#153
-
copy: Allows values of types with this ability to be copied. |
Beta Was this translation helpful? Give feedback.
Answered by
Demian101
Oct 26, 2022
Replies: 1 comment
-
Move 类型的几种能力
用 key,store 修饰,则表示它不能被复制,也不能被丢弃或重新使用,但是它却可以被安全地存储和转移。 struct Counter has key, store {
value:u64,
} 整型、布尔等原生类型天然具有 copy、drop、store 能力。 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
liuyangc3
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Move 类型的几种能力
用 key,store 修饰,则表示它不能被复制,也不能被丢弃或重新使用,但是它却可以被安全地存储和转移。
整型、布尔等原生类型天然具有 copy、drop、store 能力。