加载中
Rust实战技巧:消除歧义

如果多个Trait有相同名称的关联类型(Associated Type),在使用时可能出现歧义: trait Foo { type Bar; } trait Foo2 { type Bar; } trait Baz: Foo + Foo2 { fn bar() -> S...

2017/01/30 01:21
530
Rust语言实现的Slab内存管理器源码分析

Linux 所使用的 slab 分配器的基础是 Jeff Bonwick 为 SunOS 操作系统首次引入的一种算法。Jeff 的分配器是围绕对象缓存进行的。在内核中,会为有限的对象集(例如文件描述符和其他常见结构)...

2016/10/09 17:11
3.7K
Fn FnMut FnOnce以及move的区别

There are three different "kinds" of closure in Rust, Fn, FnMut, and FnOnce, these differ in that their calling methods take &self, &mut self, and self respectively. This means ...

2015/11/07 07:32
2.9K
rust 编译openssl错误

问题:rust编译openssl出错: --- stderr /Users/misko/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.6.4/src/openssl_shim.c:1:10: fatal error: 'openssl/hmac.h' fil...

auto deref or auto ref ?

trait Double {     fn double(self) -> usize; } impl<'a> Double for &'a String {     fn double(self) -> usize { self.len()} } impl<'a, 'b, 'c> Double ...

命令行程序接口描述语言[译]

docopt 是一种有特定格式的帮助信息,用于描述命令行接口,基于几十年来命令行应用程序的帮助信息和使用手册的对程序接口描述的惯用格式开发。本文翻译其官方文档,说明其具体格式。

Rust 1.0.0-alpha 即将释出

Rust 1.0.0-alpha 即将释出,以下是抢先版的发行说明

Rust runtime error: Illegal instruction: 4

use std::intrinsics; #[deriving(Show)] struct NewType<'a, T: 'a> {     a:int,     b:String,     v: &'a T } fn main() {         let t: NewType<int...

没有更多内容

加载失败,请刷新页面

没有更多内容

返回顶部
顶部