Function overloading in rust based on number of argument
Explore the basic idea of function overloading based on number of arguments in rust. For this purpose we make use of declarative macros to implement a basic overloaded add function.
Explore the basic idea of function overloading based on number of arguments in rust. For this purpose we make use of declarative macros to implement a basic overloaded add function.
The type Rc<T>
provides shared ownership of a value of type T
, allocated in the heap. Here we are going to look why we need Rc in Rust and using it to write a very simple example.