Keywords
【点击链接可到达rust标准库 The Rust Standard Library下的特定章节】
SelfTy | The implementing type within a trait or impl block, or the current type within a type definition. |
---|---|
as | Cast between types, or rename an import. |
async | Return a Future instead of blocking the current thread. |
await | Suspend execution until the result of a Future is ready. |
break | Exit early from a loop. |
const | Compile-time constants and compile-time evaluable functions. |
continue | Skip to the next iteration of a loop. |
crate | A Rust binary or library. |
dyn | dyn is a prefix of a trait object’s type. |
else | What expression to evaluate when an if condition evaluates to false . |
enum | A type that can be any one of several variants. |
extern | Link to or import external code. |
false | A value of type bool representing logical false. |
fn | A function or function pointer. |
for | Iteration with in , trait implementation with impl , or higher-ranked trait bounds (for<'a> ). |
if | Evaluate a block if a condition holds. |
impl | Implement some functionality for a type. |
in | Iterate over a series of values with for . |
let | Bind a value to a variable. |
loop | Loop indefinitely. |
match | Control flow based on pattern matching. |
mod | Organize code into modules. |
move | Capture a closure’s environment by value. |
mut | A mutable variable, reference, or pointer. |
pub | Make an item visible to others. |
ref | Bind by reference during pattern matching. |
return | Return a value from a function. |
self | The receiver of a method, or the current module. |
static | A static item is a value which is valid for the entire duration of your program (a 'static lifetime). |
struct | A type that is composed of other types. |
super | The parent of the current module. |
trait | A common interface for a group of types. |
true | A value of type bool representing logical true. |
type | Define an alias for an existing type. |
union | The Rust equivalent of a C-style union. |
unsafe | Code or interfaces whose memory safety cannot be verified by the type system. |
use | Import or rename items from other crates or modules. |
where | Add constraints that must be upheld to use an item. |
while | Loop while a condition is upheld. |