Rust: Ownership and Borrowing

  Рет қаралды 2,451

The Dev Method

The Dev Method

2 жыл бұрын

Let’s talk about the elephant in the room: ownership. If you have ever tried to write Rust with only glancing at a couple examples online, you will eventually run into borrowing errors from the compiler.
The ownership language feature in Rust is actually spectacular. It enables the Rust language to make memory safe guarantees without needing a garbage collector.
This is about chapter 4 in The Rust Programming Language book.
doc.rust-lang.org/book/ch04-0...
Music by Brad Kemp
secondbedroomstudio.com

Пікірлер: 7
@MykolaDolgalov
@MykolaDolgalov Жыл бұрын
Your videos are very helpful, thank you! You explain stuff very well. Thank you for investing time to these very professional and great videos. I'm attempting to convert a Java SpringBoot micro service to Rust, figuring out how to use a HashMap between threads. The concepts explained here are very helpful to understand what people discuss on Stack Overflow.
@mathematician849
@mathematician849 Жыл бұрын
Great Video This part of rust is very difficult to get specifically if you come from is/python background. Very hard learning curve for rust only due to ownership/borrow concept on Rust. Else very awesome language which is fast.
@JeremiKress
@JeremiKress 2 жыл бұрын
These videos are very appreciated, Ricky 😁 Cheers from South Africa
@sergesolkatt
@sergesolkatt 2 жыл бұрын
🤟
@fsaldan1
@fsaldan1 7 ай бұрын
Very confusing and it looks logically inconsistent. First it says there can be only one owner. But later it is Ok for r1 and r2 to own the same variable. A mess.
@misokaso2131
@misokaso2131 6 ай бұрын
I'd encourage you to watch that section of the video again as it clearly explains your misunderstanding of the given concept.
@scitechplusexplorer2484
@scitechplusexplorer2484 5 ай бұрын
r1 and r2 borrows value, doesn't owns them, ownership of value still remains with 's'.
Rust: Slice Types
7:29
The Dev Method
Рет қаралды 6 М.
Rust: Send Data between Threads
8:26
The Dev Method
Рет қаралды 9 М.
We Got Expelled From Scholl After This...
00:10
Jojo Sim
Рет қаралды 19 МЛН
When Steve And His Dog Don'T Give Away To Each Other 😂️
00:21
BigSchool
Рет қаралды 16 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 39 МЛН
TRY NOT TO LAUGH 😂
00:56
Feinxy
Рет қаралды 10 МЛН
Rust: Error Handling
19:16
The Dev Method
Рет қаралды 14 М.
Rust: RefCell
20:00
The Dev Method
Рет қаралды 6 М.
Rust: Iterators
20:07
The Dev Method
Рет қаралды 14 М.
Learning Rust: Memory, Ownership and Borrowing
7:46
YouCodeThings
Рет қаралды 89 М.
Understanding Ownership in Rust
25:31
Let's Get Rusty
Рет қаралды 239 М.
Rust: Shared-State Concurrency
7:06
The Dev Method
Рет қаралды 10 М.
Rust: Store Data on the Heap with Box
10:02
The Dev Method
Рет қаралды 4,9 М.
Rust: Starting a Workspace
27:47
The Dev Method
Рет қаралды 7 М.
A Simpler Way to See Results
19:17
Logan Smith
Рет қаралды 95 М.
ARRAYLIST VS LINKEDLIST
21:20
Core Dumped
Рет қаралды 49 М.
ПОКУПКА ТЕЛЕФОНА С АВИТО?🤭
1:00
Корнеич
Рет қаралды 631 М.
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 5 МЛН
Bluetooth Desert Eagle
0:27
ts blur
Рет қаралды 6 МЛН
Хотела заскамить на Айфон!😱📱(@gertieinar)
0:21
Взрывная История
Рет қаралды 387 М.