Des exemples de code pour programmer en Rust
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- mod mon_module {
- pub fn a() { // la fonction est publique
- println ! ("fonction a") ;
- }
- fn b(){ // la fonction b est privée
- println ! ("fonction b") ;
- }
- }
- fn main() {
- mon_module::a() ;
- mon_module::b() ; // appelle une fonction privée
- }
|