Content deleted Content added
mNo edit summary |
m →Rust |
||
Line 197:
</syntaxhighlight>
To simplify tedious and repeated implementation of traits like <code>Debug</code> and <code>Ord</code>, the <code>derive</code> macro can be used to request compilers to generate certain implementations automatically.<ref>{{Cite web | url=https://doc.rust-lang.org/book/first-edition/traits.html | title=Traits - the Rust Programming Language}}</ref> Derivable traits include: <code>Clone</code>, <code>Copy</code>, <code>Debug</code>, <code>Default</code>, <code>PartialEq</code>, <code>Eq</code>, <code>PartialOrd</code>, <code>Ord</code> and <code>Hash</code>.
==See also==
|