Did you miss writing out an XML element end tag in your Rust codes? There is a convenient way to avoid this in Rust using Closure.
Quicksort Algorithm Example in Rust
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.
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.
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 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.
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.