Module s2_lifetime

Source
Expand description

第二章:Rust核心概念 2.2 生命周期与借用检查

借用检查相关代码

Functions§

understand_lifetime
理解普通生命周期参数:
understand_lifetime_early_late_bound
说明: 生命周期参数:late bound vs early bound
understand_lifetime_for_closure
闭包 与 高阶生命周期
understand_lifetime_hrtb
示例: 理解 trait对象中的生命周期参数
understand_lifetime_in_generic_type
理解 T vs &T
understand_nll
理解借用检查 NLL
understand_scope
理解词法作用域