This post is about an example of the Quicksort algorithm in Rust. It sorts an array of i32 with 13 elements.
Rust – Mutable and Shared Borrowing
There are two types of borrowing in Rust – mutable and shared borrowing.
Async Fn and Await Example in Rust That’ll Open Your Mind
This post provides an example the uses async, async fn, and await for asynchronous processing. The sample codes use the futures crate to block the main function until the asynchronous function completes execution.
Rust – Read EPCIS 1.2 XML Into Struct Instance
This post is about reading an EPCIS 1.2 XML in a Struct instance.
Secure Actix-Web Application With TLS
This post demonstrates how to secure a Actix-web web application in Rust.
Function Accepts Struct That Implements A Trait
This post briefly talks about how to create functions that accept struct instances that implement a specific trait.
How to use State Design Pattern in Rust
Anything has a state. An entity has a state. Similarly, a car can be in a state of acceleration. While it is accelerating, there are some things it certainly cannot or should not do, e.g., reversing at that very moment. The State Design Pattern treats each state as a struct whose functions represent movements to the other states.
How to Read Input from Console Examples
In Rust, we can read user inputs from the command-line console. These inputs are string values with newline characters at the end. Most of the time, we do not want those extra characters. This post provides three simple example codes
Using #[non_exhaustive] for Non-exhaustive Enums
Using non-exhaustive enums in one crate prevents codes in other crates from listing all the possible matches in a match expression. It forces developers to use wildcards for future-proofing.
How to use Local Unpublished Crates
At some point in learning Rust, we will encounter the need to create our own crates. They need to go through development and testing before there are published to creates.io. This brief post is about creating and using local unpublished crates.