Mukul Latiyan has Published 473 Articles

Abstract Classes in Dart Programming

Mukul Latiyan

Mukul Latiyan

Updated on 21-May-2021 12:16:33

2K+ Views

Abstract classes in Dart are classes that contain one or more abstract methods.Note: Abstract methods are those methods that don't have any implementation.It should also be noted that a class in Dart can be declared abstract using the "abstract" keyword followed by the class declaration. A class that is declared ... Read More

While and For Range in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 08:29:42

189 Views

We know that Rust provides a loop keyword to run an infinite loop. But the more traditional way to run loops in any programming language is with either making use of the while loop or the for range loop.While LoopThe while loop is used to execute a code of block ... Read More

Vectors in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 08:23:50

438 Views

Vectors in Rust are like re-sizable arrays. They are used to store objects that are of the same type and they are stored contiguously in memoryLike Slices, their size is not known at compile-time and can grow or shrink accordingly. It is denoted by Vec in RustThe data stored in ... Read More

Using Threads in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 08:13:32

785 Views

We know that a process is a program in a running state. The Operating System maintains and manages multiple processes at once. These processes are run on independent parts and these independent parts are known as threads.Rust provides an implementation of 1:1 threading. It provides different APIs that handles the ... Read More

Use Declarations in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 08:10:30

572 Views

Use Declarations in Rust are used to bind a full path to a new name. It can be very helpful in cases where the full path is a bit long to write and invoke.In normal cases, we were used to doing something like this:use crate::deeply::nested::{    my_function,    AndATraitType }; ... Read More

Unsafe Operation in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 08:06:59

227 Views

Unsafe Operations are done when we want to ignore the norm that Rust provides us. There are different unsafe operations that we can use, mainly:dereferencing raw pointersaccessing or modifying static mutable variablescalling functions or methods which are unsafeThough it is not recommended by Rust that we should use unsafe operations ... Read More

Super and Self Keywords in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 05-Apr-2021 07:44:24

593 Views

Whenever we want to remove the tedious long importing paths of functions that we want to invoke, either from the same function or from a different module, we can make use of the super and self keywords provided in Rust.These keywords help in removing the ambiguity when we want to ... Read More

Structs in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 03-Apr-2021 14:46:42

654 Views

Structs in Rust are user-defined data types. They contain fields that are used to define their particular instance.We defined structs with the help of the struct keyword followed by the name we want for the struct. The name of the struct should describe the significance of the pieces of data ... Read More

Slices in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 03-Apr-2021 14:43:14

234 Views

Slices in Rust are a collection of elements of the same data type T, but unlike arrays, it is not necessary that their length is known at compile time.In Rust, a slice is a two-word object, where the first word is actually a pointer to the data and the second ... Read More

Path Struct in Rust Programming

Mukul Latiyan

Mukul Latiyan

Updated on 03-Apr-2021 14:40:28

411 Views

Path struct in Rust is used to represent the file paths in the underlying filesystem. It should also be noted that a Path in Rust is not represented as a UTF-8 string; instead, it is stored as a vector of bytes (Vec).ExampleConsider the example shown below − Live Demouse std::path::Path; ... Read More

Advertisements