Rust – Connect to PostgreSQL Database Using Crate

Is this your sudden foray into Rust? Although not totally for beginners, this post shows how to connect to a PostgreSQL database from Rust. Note that we have updated the content of this post to use a newer version of

Rust – How to check for NULL values

Rust does not support NULL; therefore, we don’t perform NULL checks on values. It does not even have keywords for NULL. However, it provides an enum Option that we can use similarly to Java 8 Optional. No NULL Check because

docker-compose.yml YAML for MariaDB Docker Container

This post shows how to create and use a docker-compose YAML file to generate a MariaDB Docker container with initial user accounts. First, we need to install Docker for Windows. Then, use its docker-compose to process our YAML file. We

Rust – Check if key exists in HashMap Examples

This post shows how to check if a key exists in a HashMap in Rust. As we know, Rust has the HashMap struct, which is part of its Collections library that we can use to store key-value pairs. Rust HashMap

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

Rust – How to Declare and Initialize an Array

Rust is a strange language for some. However, it is a fun programming language to play (or work) with. When we need arrays in Rust, we declare and initialize an array simultaneously with size and default values. Declare And Initialize

Rust – How to create Two-Dimensional Array Example

An array is an important construct in most programming languages. This post shows how to create one- and two-dimensional arrays in Rust. Although Rust has different ways of creating arrays, the following examples demonstrate some of them. One-Dimensional Arrays Before