Загрузка...

Lesson 6 - Types & Annotations

Learn how types work in Rust by typing the code yourself.

In this lesson we explore one of the core ideas in Rust: every value has a type. The type tells Rust what kind of data it is working with, such as numbers, text, or true/false values.

You will learn how Rust can often figure out types automatically using type inference, and how we can also be explicit by adding type annotations when needed.

As always in this course, the best way to learn is by typing the code yourself and running it step by step.

In this video you will learn:

• what a type is in Rust
• how type inference works
• how to use type annotations with `:`
• common Rust types like integers, floats, booleans, and characters
• the difference between `&str` and `String`
• how mutable strings can be changed using `push_str()`

At the end of this lesson you will understand how Rust uses types to keep your programs safe and predictable.

Type the code along with the lesson to build real programming muscle memory.

For this course we assume you already have Rust and Cargo installed and that you know how to create and run a Cargo project.

If you cannot run Rust locally, you can also try the code in the Rust online playground:
[https://play.rust-lang.org/](https://play.rust-lang.org/)

This lesson is part of a beginner-friendly Rust series where we learn the language by building lots of small programs.

Subscribe for more Rust programming lessons.

#Rust #LearnRust #RustProgramming #CodingForBeginners #Programming

Видео Lesson 6 - Types & Annotations канала LateNiteLecturer
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять