blob: f50d181411994c4d4accf9aba437c64ff63b1761 [file] [log] [blame]
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +01001= Rust Tutorial
2Matthias Benkard <matthias.benkard@egym.de>
3// Meta
4:experimental:
5:data-uri:
6:sectnums:
7:toc:
8:stem:
9:toclevels: 2
10:description:
11:keywords: MI, MSW, eGym, Rust
12// Settings
13:icons: font
Matthias Andreas Benkardbbc04282019-02-28 06:21:18 +010014:source-highlighter: prettify
15:doctype: book
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +010016
17These are the lecture notes for the introduction to the Rust
18programming language held at eGym in 2019.
19
20
21= Part I: The Language
22
23== Crates & Cargo
24
25== Basic Types
26=== `u8`, `i32`, `f64`
Matthias Andreas Benkardbbc04282019-02-28 06:21:18 +010027[source,rust,subs="verbatim,attributes"]
28----
29let a = 100;
30let b = 1.0;
31let c = 100u8;
32
33let d = 2*a;
34----
35
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +010036=== Structs
37=== `impl Struct`
38=== Enums
39
40== References & Lifetimes
41=== `&` vs `&mut`
42=== `'static`
43=== `Box`, `Rc`
44
45== Polymorphism
46=== Traits
47Ex.: `ToString`
48
49=== Generics
50=== `dyn Trait`
51
52== Tidbits
53=== Clippy
54=== Lambdas
Matthias Andreas Benkardbbc04282019-02-28 06:21:18 +010055=== Doctests
56
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +010057
58= Part II: The Standard Library
59
60== Error Handling
61
62== More Types
63=== `String`, `&str`
64=== `Vec`, `&[]`
65=== `Fn`
66=== `Iter`
Matthias Andreas Benkardbbc04282019-02-28 06:21:18 +010067
68== More Traits
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +010069=== `impl Trait`
Matthias Andreas Benkardbbc04282019-02-28 06:21:18 +010070=== `Sized`
Matthias Andreas Benkardac0ea8e2019-02-23 07:09:34 +010071
72== Safe Concurrency
73=== `Sync`
74=== `Send`
75=== `Arc`
76