What is the Meaning of the Asterisk * Symbol in Rust?

Have you recently seen the asterisk (*) symbol in Rust while reading someone else’s code and you are not sure what it means? No worries, this article will explain the meaning of * and show you how it can become handy during development. The asterisk (*) symbol is Rust’s dereference unary operator. The dereference operator … Read more

(Solved) error: toolchain ‘nightly-x86_64-pc-windows-msvc’

Have you ever cloned a Rust project on your local machine, installed all its dependencies, and attempted to compile it but you came across the error error: toolchain ‘nightly-x86_64-pc-windows-msvc’ is not installed. No worries, here is how you can fix this error. To fix the error error: toolchain ‘nightly-x86_64-pc-windows-msvc’ is not installed , make sure … Read more

Rust | Difference between then() vs and_then() vs or_else()

As you learn Rust, you find out more and more functions that sound like they behave in a similar way, when in reality they differ in subtle ways. This is the case for the functions then() , and_then() , and or_else(). No worries, this article will cover each of these methods as well as their … Read more

Rust Error Handling | How to Define Generic Error Types?

Result<T,E> is a common data type that allows propagating Rust errors without necessarily crashing the Rust program unless the program panics. The Result<T, E> is made out of T or generic data type when the result is Ok(T) or Err(E) whenever an error occurs. One common question new Rust developers ask is: How do you … Read more

Rust | How To Build A Rust API Using Hyper? (Step-by-step)

APIs are a key component of modern applications no matter the programming language they are written. Learning how to build a Rust API can be seen as a challenging task, especially on a programming language that is considered hard and with a steep learning curve. Hopefully, you will learn how to build a Rust API … Read more

Rust | How to Read User Input (stdin) In Rust?

It is common to learn how to detect user input (stdin) when learning a new programming language, and Rust is not the exception. In this article, you will learn how to read the user input from a terminal. Here are the steps to read user input (stdin) in Rust: Import the std::io crate Generate a … Read more

JavaScript | How Double Bangs (Exclamation Marks) !! Work

In Javascript, most users are well familiar with the single exclamation mark (“!”) symbol (the logical “not” operator) used to reverse a boolean value. For example, !true will return false and !false will return true. Now, you must have come across the double exclamation mark !! symbols in your coding journey. Some developers call them … Read more

Rust | The Difference Between .clone() and .to_owned()

Chances are you recently came across the definition of the ToOwned trait to realize it is a generalization of the Clone trait? If so, what is the difference between the two traits? more specifically, what is the difference between .clone() and .to_owned() if they work the same? A generalization of Clone to borrowed data. https://doc.rust-lang.org/std/borrow/trait.ToOwned.html#tymethod.to_owned … Read more

Rust | How To Make an HTTP Request in Rust? (Step-by-step)

If you are relatively new to Rust, you probably have gone through a decent learning curve to understand the programming language concepts. Working with hardcoded data in your projects is not common when working on real-world application, but rather making HTTP requests to fetch data from other APIs. After all, do you know how to … Read more