Skip to main content
A trait for copying values. By default, variables in Cairo have ‘move semantics’, meaning they are moved when used. However, types implementing Copy have ‘copy semantics’, allowing the value to be duplicated instead of moved.

Signature

Examples

Without Copy (move semantics):
With Copy (copy semantics):