6 - PDFsam - Beginning Rust - From Novice To Professional (PDFDrive)

Вам также может понравиться

Вы находитесь на странице: 1из 1

Table of Contents

Unsigned Integer Number Types������������������������������������������������������������������������������������������������� 68


Target-Dependent Integer-Number Types����������������������������������������������������������������������������������� 68
Type Inference����������������������������������������������������������������������������������������������������������������������������� 70
The Type Inference Algorithm����������������������������������������������������������������������������������������������������� 72
Floating-Point Numeric Types����������������������������������������������������������������������������������������������������� 73
Explicit Conversions�������������������������������������������������������������������������������������������������������������������� 74
Type Suffixes of Numeric Literals����������������������������������������������������������������������������������������������� 75
All the Numeric Types����������������������������������������������������������������������������������������������������������������� 76
Booleans and Characters������������������������������������������������������������������������������������������������������������ 77
The Empty Tuple�������������������������������������������������������������������������������������������������������������������������� 79
Array and Vector Types��������������������������������������������������������������������������������������������������������������� 80
Constants������������������������������������������������������������������������������������������������������������������������������������ 81
Discovering the Type of an Expression��������������������������������������������������������������������������������������� 81

Chapter 7: Enumerating Cases������������������������������������������������������������������������������� 83


Enumerations������������������������������������������������������������������������������������������������������������������������������ 83
The match Construct������������������������������������������������������������������������������������������������������������������� 85
Relational Operators and Enums������������������������������������������������������������������������������������������������� 87
Handling All the Cases���������������������������������������������������������������������������������������������������������������� 88
Using match with Numbers��������������������������������������������������������������������������������������������������������� 89
Enumerations with Data�������������������������������������������������������������������������������������������������������������� 90
“match” Expressions������������������������������������������������������������������������������������������������������������������ 94
Use of Guards in match Constructs��������������������������������������������������������������������������������������������� 94

Chapter 8: Using Heterogeneous Data Structures�������������������������������������������������� 97


The Tuples����������������������������������������������������������������������������������������������������������������������������������� 97
The Structs���������������������������������������������������������������������������������������������������������������������������������� 99
The Tuple-Structs���������������������������������������������������������������������������������������������������������������������� 102
Lexical Conventions������������������������������������������������������������������������������������������������������������������ 103

Вам также может понравиться