There are several ways to implement or use a stack in Rust. A stack is a data structure that allows us to store data in LIFO (last-in-first-out). Rust has no stack data structure, but it offers data structures with similar
Rust – How to Compare Struct Instances With Traits
In Rust, we can compare if two struct instances are equivalent and whose respective field values are the same. However, doing so requires using traits. Equivalent vs. Partial Equivalent Before we proceed, let us differentiate between Equivalent and Partial Equivalent.
How To Concatenate Strings in Rust
We can concatenate Strings in any programming language, including Rust, and we do it a lot. No programming language does not deal with string concatenation. However, Rust is different as it has two types of strings – String and str.
Difference Between String and str in Rust
Rust has two (type of) string values – String and str. The difference between them is huge because Rust ships with functions that cater to both string types. Rust String and str Rust String is a dynamic string type from the
Mock Method To Return Different Values in Mockito
This post shows how to mock a method that returns unique values for different arguments in Mockito. For example, the return values vary according to the method argument. Sample Codes To Mock Suppose we have the following Java classes. The
Grow with Google PSM I discount – for PSM II instead?
I have completed the Google Project Management certificate at Coursera and got a PSM I discount. But there is one problem – I am already a Professional Scrum Master I certified, courtesy of my employer. Anyway, I still availed of
Rust Ownership is Easy! Don’t Panic!
The Ownership concept in Rust is easy to grasp! Wait until you get to Rust lifetimes! When we talk about ownership in Rust, we generally mean – a variable owns a value. Seemingly nothing special, right? But the unique part
Rust HashMap Examples
This post shows Rust HashMap basic examples, particularly for beginners. A map is a type of data structure that allows us to store key-value pair data. We may have learned it from other programming languages like Java. In Rust, the
Rust Stable And Rocket 0.5 Latest Development Codes
As posted in Rust Framework Rocket Goes Stable, Rocket will be compatible with Rust Stable, starting with version 0.5. It is almost September, and we will have the new release any time soon. We can already use the latest Rocket
How To Update Rust On Windows
It is very easy to update Rust on Windows to the latest version. You could install either the stable or nightly release and update from it. For those new to Rust, I would recommend installing the stable release. Install Rust