Open AmitKumarDas opened 3 years ago
- :: used in imports
- :: used invoke static functions
- : used to separate variable name from type
- name: type
- &Str is the string literal
- &var is the immutable reference
- fn to define a function
- ; to end the line
- statically allocated string
- --bin to build an executable instead of using as a library
- ::funcname() // function associated of a particular type instead of its instance
- ::funcname() // called as static method in some languages
- use std::io // associated functions can be used in import statements as well
- std::io::stdin() // nested notation for associated function
- std::io::stdin() // returns std::io::Stdin handle
- &var // is a immutable reference
- &mut var // is a mutable reference