Rust Programming Tutorial #16 - References

Описание к видео Rust Programming Tutorial #16 - References

In this video I talk about references and borrowing in Rust - there are two types of references: immutable and mutable.

Immutable references don't allow you to change the value of the resource you are referring to while mutable references do allow this.

As read from the Rust documentation:
(https://doc.rust-lang.org/1.12.0/book...)

- You can have multiple immutable references to a variable in the same scope.

OR

- You can have 0 or exactly 1 mutable reference to a variable in the same scope.

Only one at a time.

If this video helped you out and you'd like to see more, make sure to leave a like and subscribe to dcode!

Комментарии

Информация по комментариям в разработке