Rust:- Data Structure – struct – print – display implementation ( fmt::Display )

Background In Rust, let us cover how to print out the contents of the struct data structure. In this post we will use the fmt::Display trait.   Lineage Rust:- Data Structure – struct – print – debug implementation ( fmt::Debug ) Link   Definition Statement Rust-Lang.org Debug Link All types which want to use std::fmt … Continue reading Rust:- Data Structure – struct – print – display implementation ( fmt::Display )

Rust:- Data Structure – struct – print – debug implementation ( fmt::Debug )

Background In Rust, let us cover how to print out the contents of the struct data structure. In this post we will use the fmt::Debug trait.   Definition Statement Rust-Lang.org Debug Link All types which want to use std::fmt formatting traits require an implementation to be printable. Automatic implementations are only provided for types such … Continue reading Rust:- Data Structure – struct – print – debug implementation ( fmt::Debug )

Rust:- Compilation Error – “expected struct `String`, found `&str`”

Background Playing around with elementary Rust Code and found out more about its strong type checking.   Code Original Output Output - Image Output - Text Explanation The error springs from the fact that the Person structure defines the name variable as a string object. But, we are passing along a string literal.   Definition … Continue reading Rust:- Compilation Error – “expected struct `String`, found `&str`”

Rust:- Build Warning – “crate should have a snake case name” – Project Rename

Background Rust is really finicky in terms of naming convention. Lineage Rust:- Build Warning – “crate should have a snake case name” – Workaround – Ignore Date Posted:- 2022-September-15th Link   Error Message Image Text Troubleshooting Outline Project Creation Manifest File ( Cargo.toml ) Project Creation Here is the command we used to create the … Continue reading Rust:- Build Warning – “crate should have a snake case name” – Project Rename

Rust:- Build Warning – “crate should have a snake case name” – Workaround – Ignore

Background Rust is really finicky in terms of naming convention. Error Message Image Text Troubleshooting Outline Project Creation Manifest File ( Cargo.toml ) Project Creation Here is the command we used to create the project. Image Text   Manifest File ( Cargo.toml ) Running "cargo new" creates a manifest file. Here is what it looks … Continue reading Rust:- Build Warning – “crate should have a snake case name” – Workaround – Ignore

Rust:- Hello World ( Customized )

Background Let us do a quick Hello World Program in Rust. Steps Create Project Code Build Project Run Application Tasks Create Project Command Syntax Sample Output Output - Image Output - Text Code Outline Files Package Handling ( manifest file ) cargo.toml Add required modules Source Code src\main.rs Add a bit more code to the … Continue reading Rust:- Hello World ( Customized )

Rust:- Installation – Warning – “Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later”

Background Trying to install a rust compiler on my windows laptop. Got a warning. Let us quickly cover it. Warning Command Earlier I downloaded rust-init.exe. Images Image - "Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later, but they don't seem to be installed" Text   >rustup-init.exe Rust Visual C++ prerequisites … Continue reading Rust:- Installation – Warning – “Rust requires the Microsoft C++ build tools for Visual Studio 2013 or later”

Software Engineering meets Poetry

Quotes Susan Cain “Tom Demarco, a principal of the Atlantic Systems Guild team of consultants ... and his colleague Timothy Lister devised a study called the Coding War Games. The purpose of the games was to identify the characteristics of the best and worst computer programmers; more than six hundred developers from ninety-two different companies … Continue reading Software Engineering meets Poetry