#Rust πŸ¦€ – Let’s create a Generic log() FunctionπŸ‘

Hi ! Let’s create a generic log function. This will not make a lot of sense, since the println! function already support lots of data types. However, this is a nice way to understand how generics works. Here is the log function. use std::fmt::Display; // Generic Function to print data to the console fn console_log<T:…… Continue reading #Rust πŸ¦€ – Let’s create a Generic log() FunctionπŸ‘

#Rust πŸ¦€ – Working with Generics and Types πŸ‘

Hi ! I first used Generics back in the old C# days. It’s a super cool feature. Let’s ask ChatGPT for a definition: Generics in programming are a way to create classes and methods that work with multiple data types. They allow the programmer to define type parameters, which can be passed as arguments to…… Continue reading #Rust πŸ¦€ – Working with Generics and Types πŸ‘