jagomart
digital resources
picture1_Programming Pdf 184634 | Rust Tutorial


 176x       Filetype PDF       File size 1.93 MB       Source: www.tutorialspoint.com


File: Programming Pdf 184634 | Rust Tutorial
rust i rust about the tutorial rust is a modern systems programming language developed by the mozilla corporation it is intended to be a language for highly concurrent and highly ...

icon picture PDF Filetype PDF | Posted on 01 Feb 2023 | 2 years ago
Partial capture of text on file.
                                                   RUST        
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
         
                                                     i 
                           
                                                   RUST        
        About the Tutorial 
        Rust is a modern systems programming language developed by the Mozilla Corporation. 
        It is intended to be a language for highly concurrent and highly secure systems. It compiles 
        to native code; hence, it is blazingly fast like C and C++. 
        This tutorial adopts a simple and practical approach to describe the concepts of Rust 
        programming.   
        Audience 
        This tutorial has been prepared for beginners to help them understand the basic and 
        advanced concepts of Rust. 
        Prerequisites 
        We assume that the reader has an understanding of basic programming concepts is 
        necessary for this course. 
        Copyright & Disclaimer 
         Copyright 2019 by Tutorials Point (I) Pvt. Ltd.  
        All the content and graphics published in this e-book are the property of Tutorials Point (I) 
        Pvt. Ltd.  The user of this e-book is prohibited to reuse, retain, copy, distribute or republish 
        any contents or a part of contents of this e-book in any manner without written consent 
        of the publisher.   
        We strive to update the contents of our website and tutorials as timely and as precisely as 
        possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. 
        Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our 
        website or its contents including this tutorial. If you discover any errors on our website or 
        in this tutorial, please notify us at contact@tutorialspoint.com 
         
         
         
         
         
         
                       
                                                     i 
                           
                                                                                                                                                   RUST        
                      Table of Contents 
                           About the Tutorial ...................................................................................................................................... i 
                           Audience .................................................................................................................................................... i 
                           Prerequisites .............................................................................................................................................. i 
                           Copyright & Disclaimer ............................................................................................................................... i 
                           Table of Contents ...................................................................................................................................... ii 
                      1.   RUST — Introduction ................................................................................................................................ 1 
                           Application v/s Systems Programming Languages ...................................................................................... 1 
                           Why Rust? ................................................................................................................................................. 1 
                      2.   RUST — Environment Setup ...................................................................................................................... 3 
                           Installation on Windows ............................................................................................................................ 3 
                           Installation on Linux / Mac ......................................................................................................................... 5 
                           Using Tutorials Point Coding Ground for RUST ........................................................................................... 5 
                      3.   RUST — HelloWorld Example .................................................................................................................... 6 
                           What is a macro? ....................................................................................................................................... 7 
                      4.   RUST — Data Types ................................................................................................................................... 9 
                           Declare a Variable...................................................................................................................................... 9 
                           Scalar Types............................................................................................................................................. 10 
                           Integer .................................................................................................................................................... 10 
                           Float ........................................................................................................................................................ 12 
                           Boolean ................................................................................................................................................... 13 
                           Character ................................................................................................................................................ 14 
                      5.   RUST — Variables ................................................................................................................................... 15 
                           Rules for Naming a Variable ..................................................................................................................... 15 
                           Syntax ..................................................................................................................................................... 15 
                           Immutable ............................................................................................................................................... 15 
                           Mutable .................................................................................................................................................. 16 
                                                                                                                                                          ii 
                                                                             
                                                                                                                                                   RUST        
                      6.   RUST — Constant .................................................................................................................................... 18 
                           Rust Constant Naming Convention ........................................................................................................... 18 
                           Constants v/s Variables............................................................................................................................ 18 
                           Shadowing of Variables and Constants ..................................................................................................... 19 
                      7.   RUST — String ......................................................................................................................................... 21 
                           String Literal ............................................................................................................................................ 21 
                           String Object ........................................................................................................................................... 22 
                           Illustration: new() .................................................................................................................................... 24 
                           Illustration: to_string() ............................................................................................................................. 24 
                           Illustration: replace() ............................................................................................................................... 24 
                           Illustration: as_str() ................................................................................................................................. 25 
                           Illustration: push() ................................................................................................................................... 25 
                           Illustration: push_str() ............................................................................................................................. 26 
                           Illustration: len() ...................................................................................................................................... 26 
                           Illustration: trim() .................................................................................................................................... 26 
                           Illustration:split_whitespace() .................................................................................................................. 27 
                           Illustration: split() string........................................................................................................................... 28 
                           Illustration: chars() .................................................................................................................................. 28 
                           Concatenation of Strings with + operator ................................................................................................. 29 
                           Illustration: Type Casting ......................................................................................................................... 30 
                           Illustration: Format! Macro ...................................................................................................................... 30 
                      8.   RUST — Operators .................................................................................................................................. 31 
                           Arithmetic Operators ............................................................................................................................... 31 
                           Relational Operators................................................................................................................................ 32 
                           Logical Operators .................................................................................................................................... 34 
                           Bitwise Operators .................................................................................................................................... 35 
                      9.   RUST — Decision Making ........................................................................................................................ 38 
                           If Statement ............................................................................................................................................ 39 
                                                                                                                                                         iii 
                                                                             
The words contained in this file might help you see if this file matches what you are looking for:

...Rust i about the tutorial is a modern systems programming language developed by mozilla corporation it intended to be for highly concurrent and secure compiles native code hence blazingly fast like c this adopts simple practical approach describe concepts of audience has been prepared beginners help them understand basic advanced prerequisites we assume that reader an understanding necessary course copyright disclaimer tutorials point pvt ltd all content graphics published in e book are property user prohibited reuse retain copy distribute or republish any contents part manner without written consent publisher strive update our website as timely precisely possible however may contain inaccuracies errors provides no guarantee regarding accuracy timeliness completeness its including if you discover on please notify us at contact tutorialspoint com table ii introduction application v s languages why environment setup installation windows linux mac using coding ground helloworld example wh...

no reviews yet
Please Login to review.