In Rust, we can run codes when an instance is about to be destroyed. This post briefly demonstrates how to perform just that.
Rust – Display Contents of Array, Tuple, HashMap and Vector
When using collection types, we sometimes do not want to use loops to display each value. For example, in Rust, we can display the content of an Array, Tuple, HashMap (Map), or Vector without loops using the Debug trait. Rust
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.
Rust Display Struct Content Using Directive Or Traits
In Rust, we can display the contents of a struct type without explicitly printing out all the fields it has.
Rust – Validate Email Address using Regular Expressions
This post about validating email addresses in Rust using the crate regex and regular expressions based on this other post.
Rust – Connect to MySQL And Query For Data
This post is about connecting to MySQL from Rust.
Rust – How to check if a String is Numeric
We always work with string values. In Rust, we can check if a string value is numeric or not using the function is_numeric() on a char value. That means we look at each character within a string. Rust Codes To
Rust – How to read last few lines of a File
Sometimes we don’t want to load read all the content of a text file. For instance, we only want to see the last several lines. In Rust, we can use a crate called rev_lines to read and display the last
Rust – How to Create a List Using Vec, VecDeque, and LinkedList
In Rust, we may refer to any list as a sequence of items. A list can be fixed size like an array or resizeable collection types – Vec, VecDeque, and LinkedList. Meaning the list can grow or shrink at runtime.
Rust – How to get Keys and Values from HashMap
In Rust, we can store key and value pairs using HashMap. This post shows how to store and extract the keys and values from a HashMap using the functions iter(), keys(), values(), get(), and unwrap(). Store Test Data Into a