Chez oim, forum libre

Débattre => Informatique, programmation, geek attitude... => Discussion démarrée par: Songbird le lundi 27 juin 2016, 15:17

Titre: Comment implémenter un trait ?
Posté par: Songbird le lundi 27 juin 2016, 15:17
Pour implémenter un trait, vous devez utiliser les mot-clés impl et for comme ceci:

Code
impl YourInterface for YourStruct
{

}

Voir aussi:
Rust supporte-t-il le camel case ? (https://chez-oim.org/index.php/topic,1674.0.html)
Qu'est-ce qu'un trait ? (https://chez-oim.org/index.php/topic,1680.0.html)