Rust Installation The first step is to install Rust. First of all, download Rust through rustup which is a command line tool…
ownership
-
-
Rust Trait Rust trait is a feature of a Rust language that describes the functionality of each type that it can provide.…
-
Referring to names in different modules When we call the function of a module, then we need to specify the full path.…
-
Concise control flow with if let The if let syntax is used to combine if and let which handles the values that…
-
Rust Recoverable Errors Recoverable errors are those errors which are not very serious to stop the program entirely. The errors which can…
-
RefCell<T> Interior mutability pattern is a pattern is used to mutate the reference if we have an immutable reference. RefCell<T> can be…
-
Using “if in a let” statement An ‘if’ expression is used on the right hand side of the let statement and the…
-
String Rust contains the two types of strings: &str and String. String: A string is encoded as a UTF-8 sequence. A string…
-
‘If’ statement The ‘if’ statement determines whether the condition is true or not. If condition is true then the ‘if’ block is…
-
Method Syntax Methods are similar to functions as they contain the fn keyword at the starting and then function name. Methods also…