How to Read Data from Files in Rust

preview_player
Показать описание
Five idiomatic ways to read data from files in Rust

---

Timestamps:

00:00 Intro
00:48 Reading an entire File into a String - Code
01:13 Reading an entire File into a String - Advantages and Disadvantages
01:52 Reading an entire File into a Byte Vector - Code
02:32 Reading an entire File into a Byte Vector - Advantages and Disadvantages
03:00 Reading a File Line by Line - Code
03:44 Reading a File Line by Line - Advantages and Disadvantages
04:19 Reading a File in Single Byte-Steps - Code
05:03 Reading a File in Single Byte-Steps - Advantages and Disadvantages
05:42 Reading a File in Byte Chunks - Code
06:39 Reading a File in Byte Chunks - Advantages and Disadvantages
07:22 Outro

---

There's nothing like reading data from files in Rust.

Like any other programming language, one way to do it would be too easy, so there are, of course, way more ways than anyone can count.

Gladly, there are a few idiomatic ways we can go over in this video!

---

Do you want a blog post to bookmark, so you can come back to it any time (and to this video, of course!)?

Рекомендации по теме
Комментарии
Автор

Ahh, every time I see one of your videos I feel like learning Rust!
Great work again. Keep them coming 💪

SimonHoiberg
Автор

Thanks! Very good intro to low level file operations

saa
Автор

Brilliant and to the point. Greatly appreciated!

noblenetdk
Автор

How about a short on the pros of learning Rust as a language ? Why would someone want to / should learn rust?

travismounsteven
Автор

I like that you keep it in clean rust, but maybe you could mention crates to help - if they exist

noblenetdk
Автор

Thanks for this video. It was very helpful.

davidtremaine