Merge Sort Algorithm in Rust Codes

Merge Sort is an algorithm invented by John von Neumann in 1945 and it is one of the most efficient sorting algorithms. It uses the principle of divide-and-conquer.

Why You Should Choose Rust Stable Over Nightly

If you are new to Rust, choose Rust Stable over Nightly to make your life and other people’s lives simple – may apply to both crate producers and consumers. There are three types of Rust compiler – Nightly, Beta, and

Vec With Specific Trait Type

In this post, we want to create a Vec instance that only accepts struct instances that implements a particular trait.

Actix-Web With MySQL Using R2D2 For Connection Pool

R2D2 is a connection pool for Rust applications, e.g., Actix-Web, that use databases like MySQL. Opening and closing a database connection is an expensive operation. With connection pooling, the database connection creation happens once, and the application can reuse it

How to use Strategy Design Pattern in Rust

This Design Pattern replaces a behavior with different implementation at run-time or sometimes at load-time by means of configuration. Two entities could have different implementations of the same behavior.

How to use Command Design Pattern in Rust

This Design Pattern uses commands to wrap and invoke capabilities. A car can run faster and slower. We can have commands AccelerateCommand and DecelerateCommand for increasing and decreasing speed, respectively. We can also have AccelerateAndDecelerateCommand to run both capabilities in a certain order.