Rust HTTP Client

HTTP Client with Reqwest by using Rust

Introduction The reqwest crate delivers a suitable, higher-level HTTP Client. It controls several of the things that record people just imagine an HTTP client to do for them. The reqwest::Client is asynchronous. The reqwest::blocking API can be more useful for applications desiring to only create a few HTTP requests. In this article, we will make … Read more

Rust Refactoring to enhance Modularity

Introduction Producing reliable system software is challenging. Pointer manipulation, mutable heap data, and concurrency are typically employed to realize high performance but cause subtle bugs that are notoriously difficult to uncover and reproduce. The Rust programing language resolves this problem by preventing some errors statically through its type system, which associates an exclusive capability with each mutable … Read more

Iterators Pattern in Rust

Iterators Pattern in Rust

Handling a Series of Items with Iterators The iterator form permits us to perform some tasks on a sequence of items in turn. An iterator is in authority for the logic of iterating over each item. It is also responsible for determining when the sequence has finished. When we use iterators, we don’t have to … Read more

Rust Macros and Functions

Rust Macros and Functions

Introduction The term macro refers to a family of features in Rust: declarative macros with macro_rules! and three sorts of procedural macros: Custom #[derive] macros that specify code added with the derive attribute used on structs and enums Attribute-like macros that outline custom attributes usable on any item Function-like macros that appear as if the … Read more

Rust Regular References with the Deref Trait

Introduction Implementing the Deref trait permits us to customize the behavior of the dereference operator, * (as against the multiplication or glob operator). By implementing Deref in such how that a wise pointer is often treated kind of a daily reference, we’ll write code that operates on references and use that code with smart pointers too. Description Let’s first inspect how the dereference operator … Read more

Building,Flashing and Debugging Embedded Rust Program

Building,Flashing and Debugging Embedded Rust Program

Building Program Cargo provides 4 different targets that cover the different processor families within that architecture. thumbv6m-none-eabi, for the Cortex-M0 and Cortex-M1 processors thumbv7m-none-eabi, for the Cortex-M3 processor thumbv7em-none-eabi, for the Cortex-M4 and Cortex-M7 processors thumbv7em-none-eabihf, for the Cortex-M4F and Cortex-M7F processors The one we are interested in is the last one (i.e. thumbv7em-none-eabihf) because F3 … Read more

What’s the serial communication in Rust?

What is serial communication in Rust?

 Description It’s a communication mechanism that takes place using the asynchronous protocol. Two devices exchange data serially in this communication 1 bit at a time These 2 devices exchange data using 2 shared data lines and 1 common ground. The protocol is asynchronous because none of the shared lines carries a clock. But both (transmitter … Read more