1 00:00:05,790 --> 00:00:09,810 Another trait we talked about a little earlier on in this course is copy. 2 00:00:09,870 --> 00:00:15,180 But now we're able to talk about it a little bit more in depth and as to what is allowed to implement 3 00:00:15,180 --> 00:00:15,870 a copy. 4 00:00:16,080 --> 00:00:22,650 Simple types like I 32 that don't own any resources can be a copy type. 5 00:00:23,220 --> 00:00:27,720 A type is copy if it implements trait, copy and then clone. 6 00:00:27,720 --> 00:00:29,460 So what we're seeing here. 7 00:00:31,530 --> 00:00:38,010 Russ is going to allow a type to implement copy only if a shallow byte four byte copy is all it needs. 8 00:00:38,940 --> 00:00:45,420 This means that any type that owns any other resources, like a heat buffer or operating system handles 9 00:00:45,420 --> 00:00:47,010 cannot implement copy. 10 00:00:47,700 --> 00:00:49,900 There are two ways that we can implement a copy. 11 00:00:49,920 --> 00:00:56,550 We can say derive copy and clone, or we can implement copy for our type. 12 00:00:56,550 --> 00:01:01,080 In this case it's a struct or then implement clone for our struct. 13 00:01:01,290 --> 00:01:08,640 Remember though, making a type copy places extra restrictions on our type, so it's important to consider 14 00:01:08,640 --> 00:01:11,280 the pros and cons prior to doing so.