< 返回版块

odd-cat 发表于 2021-06-01 21:48

揭秘Rust中的可变性和引用

Demystifying Mutability and References in Rust

un-sandwiching

Given a value, you cannot use a mutable reference between an immutable reference's declaration "zone" and immutable reference's usage "zone". Also, you cannot use mutable or immutable reference between a mutable's declaration zone and mutable's usage zone.

翻译过来就是:

  1. 对于可变引用,不能出现在不可变引用的声明域和使用域之间;
  2. 对于可变/不可变引用,不能出现在在可变引用的声明域和使用域之间。

这就是Rust的借用检查规则:

在任意给定时间,要么只能有一个可变引用,要么只能有多个不可变引用。

在Rust中使用迭代算法:共轭梯度

Iterative methods in Rust, or: A rusty conjugate gradient - Daniel Vainsencher

给C程序员的Rust入门系列文章

Learn Rust the Dangerous Way

LRtDW is a series of articles putting Rust features in context for low-level C programmers who maybe don’t have a formal CS background

Hitbox:异步分布式缓存框架

We are glad to announce the first release of our caching library for the Actix actor framework

A high-performance caching framework suitable for single-machine and for distributed applications in Rust


From 日报小组 odd-cat

社区学习交流平台订阅:

Rust.cc 论坛: 支持 rss

微信公众号:Rust 语言中文社区

评论区

写评论

还没有评论

1 共 0 条评论, 1 页