
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Mukul Latiyan has Published 473 Articles

Mukul Latiyan
295 Views
Handling critical errors in Rust is done with the help of panic! Macro. There are other ways to handle errors in Rust, but panic is unique in the sense that it is used to deal with unrecoverable errors.When we execute the panic! Macro, the whole program unwinds from the stack, ... Read More

Mukul Latiyan
301 Views
Rust provides us with a match keyword that can be used for pattern matching. It is similar to the switch statement in C, and the first arm that matches is evaluated.ExampleConsider the example shown below −fn main() { let number = 17; println!("Tell me about {}", number); ... Read More

Mukul Latiyan
197 Views
Rust provides a loop keyword that allows us to run an infinite loop. The infinite loop indicated by the help of the loop keyword can be broken by the use of the break keyword. Also, we can exit an iteration and continue the infinite loop with the help of the ... Read More

Mukul Latiyan
621 Views
HashMap is an important data structure, as it allows us to store data in key-value pairs. In Rust, HashMap stores values by key.HashMap keys can be Boolean, Integer, strings or any other data type that implements the Eq and Hash traits.HashMaps can grow in size, and when the space becomes ... Read More

Mukul Latiyan
315 Views
From and Into are two traits that Rust provides us. They are internally linked.From TraitWe make use of From trait when we want to define a trait to how to create itself from any other type. It provides a very simple mechanism with which we can convert between several types.For ... Read More

Mukul Latiyan
178 Views
Also referred to as enumerations, enums are very useful in certain cases. In Rust, we use enums, as they allow us to define a type that may be one of a few different variants.Enumerations are declared with the keyword enum.Example Live Demo#![allow(unused)] #[derive(Debug)] enum Animal { Dog, Cat, } ... Read More

Mukul Latiyan
240 Views
Rust provides us with two types of constants. These are −const − an unchangeable valuestatic − possible mutable value with static lifetime.If we try to assign another value to an already declared const value, the compiler will throw an error.ExampleConsider the example shown below − Live Demostatic LANGUAGE: &str = "TutorialsPoint-Rust"; ... Read More

Mukul Latiyan
747 Views
Channels are a medium that allow communication to take place between two or more threads. Rust provides asynchronous channels that enable communication between threads.Channels in Rust allow a unidirectional flow of communication between two endpoints. These two endpoints are Sender and Receiver.ExampleConsider the example shown below −use std::sync::mpsc::{Sender, Receiver}; use ... Read More

Mukul Latiyan
397 Views
Casting or explicit conversion is only allowed in Rust, there’s no implicit conversion that the compiler of Rust does for us. It is known that, in many cases, implicit conversion can lead to data losses, which is not a good thing.Rules for converting between different types is pretty similar to ... Read More

Mukul Latiyan
620 Views
An array is a data structure that is used to contain objects of the same type T. These objects are stored in contiguous memory locations.In Rust, the arrays are created by making the use of [ ] brackets. It is important that the size of the arrays must be known at ... Read More