We can create custom data types in Rust using struct, trait, and enum. A struct is a composite data type that groups variables in a memory block. These variables are then accessible via the struct’s instance – also referred to
Rust Core Data Types To Get Familiar With
Rust has two types of core data types – scalar and compound. Scalar types are single-value types, while compound types are multi-value types. Integer Data Types An integer data type is one of Rust’s core data types that represents a
How To Declare And Use Variables In Rust
Variables in Rust are similar to variables in other high-level programming languages, and how we declare and use them is pretty straightforward. There are several types of variables, and their declaration may differ from each other. Types Of Variables In
docker-compose.yml For WordPress And MySQL
To set up WordPress and MySQL in no time and without installing them, here is a useful docker-compose.yml file. If you’re new to WordPress development, you’d probably installed XAMPP and MySQL on your Windows machine. You may not want to
Using An SFTP Server, Apache Camel and Spring Boot
Applications can communicate with each other in various means. One is by uploading and downloading files to and from an FTP server. But for development, we often test our applications on our local machines. Therefore, it makes sense to have
docker-compose.yml For SFTP from Atmoz
This post demonstrates how to create an SFTP Docker container from Atmoz using docker-compose.yml with the most straightforward configuration to allow for developers. Sometimes we can’t just install any FTP servers on our machines. It may be due to corporate
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
Rust Generics With Structs, Functions, Methods, and Enums
Rust Generics is a language feature for code reuse in multiple contexts using different actual types for Structs, Functions, Methods, and Enums. Moreover, they allow for concise and clean codes by minimizing boilerplates while providing type-safety. When we use Generics,
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
Things You Need To Know About Strings When Learning Rust
99% of the time, we deal with strings, which are a sequence of characters, and here are the things you need to know about them when learning Rust. 1. There Are 2 Types of String in Rust: String and str