Sorry, your browser cannot access this site
This page requires browser support (enable) JavaScript
Learn more >

内存布局struct File { name: String, data: Vec<u8>, } fn main() { let f1 = File { name: String::from("f1.txt"), data: Vec::new(), }; &#...

简介:SVN,版本管理,和git用起来类似 安装tortoiseSVN,记得勾选安装命令行工具(命令行比GUI用得舒服hhh另外如果下面要集成到vscode中用svn插件,也需要装这个): https://tortoisesvn.net/ 常用svn命令:https://svnbucket.com/posts/svn-commands-tutorial/列出命令说明 svn help ...

学习自 rust圣经 切片:全在栈上的对象,一个指针+一个长度 fn main() { let s = String::from("hello world"); let hello = &s[0..5]; let world = &s[6..11]; } world: 四种不同的类型:String(如上图的s),&...

学习自 rust圣经 强烈建议:https://gcc.godbolt.org/ 看反汇编注意,下文的“新建栈上对象”,其实不是“申请”,而是机器代码控制,在函数体对应的机器代码之前,栈顶就保留了足够长的栈,然后栈底+offset是栈上对象的起始地址 rust所有权规则 每一个值(内存对象)都被一个变量所拥有,该变量被称为值的所有者 一个值(内存对象)同时(同一个作用域内)只能被一个变量...

如图所示 蓝色箭头:一对一 橙色/绿色箭头:多对一