首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >【Rust日报】2021-06-01 揭秘Rust中的可变性和引用

【Rust日报】2021-06-01 揭秘Rust中的可变性和引用

作者头像
MikeLoveRust
发布2021-06-16 10:42:49
发布2021-06-16 10:42:49
6170
举报

揭秘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

  • repo: iterative_methods_rs
  • crate: iterative_methods

给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

  • repo: hit-box/hitbox
  • crate: hitbox : (github.com)

From 日报小组 odd-cat

社区学习交流平台订阅:

  • Rust.cc 论坛: 支持 rss
  • 微信公众号: Rust 语言中文社区
本文参与 腾讯云自媒体同步曝光计划,分享自微信公众号。
原始发表:2021-06-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 Rust语言学习交流 微信公众号,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 揭秘Rust中的可变性和引用
  • 在Rust中使用迭代算法:共轭梯度
  • 给C程序员的Rust入门系列文章
  • Hitbox:异步分布式缓存框架
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档