How to overload methods in Rust.

Overloading methods is a commonly used feature in many programming languages. Before turning to further details, let me mention early, in Rust there exists no exact ‘overloading’ of functions. But nevertheless, Rust makes available some techniques that are of upmost importance to avoid code replication and at the same time ensure security as well as its glorified performance.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store

I am a mathematician and software developer who likes writing advanced code and to do research in applied and pure mathematics.