Yet More Rust




CS152

Chris Pollett

Oct 6, 2021

Outline

Introduction

More on str

Compound Types: Arrays and Tuples

String Type

Ownership, Memory Allocation, etc

Move, Copy, Clone

In-Class Exercise

Functions and Ownership

References and Borrowing

Mutable References

Slices

Enums

The Option enum versus nulls

Structs

More on Structs

Traits

Workspaces

Package Dependencies

Packages and Crates

Modules

Compiling Projects with Multiple Files

I/O

Common Collections

Writing Tests for Rust Programs

Example Tests in a Rust Project

Rust Style Guide