Rust Search

Find the best content on Rust, curated by the community; a search engine for Rustaceans.
doc.rust-lang.org
Numeric types Integer types The unsigned integer types consist of: Type | Minimum | Maximum -------|---------|------------------- u8 | 0 | 28-1 u16 | 0 | 216-1 u32 | 0 | 232-1 u64 | 0 | 264-1 u128 | 0 | 2128-1 The signed two's complement in...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
Boolean type let b: bool = true; The boolean type or bool is a primitive data type that can take on one of two values, called true and false. Values of this type may be created using a literal expression using the keywords true and false co...
The Rust Reference Book 2024-01-01 ~2 min read
doc.rust-lang.org
Types Every variable, item, and value in a Rust program has a type. The type of a value defines the interpretation of the memory holding it and the operations that may be performed on the value. Built-in types are tightly integrated into th...
The Rust Reference Book 2024-01-01 ~2 min read
doc.rust-lang.org
Type system
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
Patterns Pattern -> `|`? PatternNoTopAlt ( `|` PatternNoTopAlt )* PatternNoTopAlt -> PatternWithoutModernRange | ModernRangePattern PatternWithoutModernRange -> LiteralPattern | IdentifierPattern | WildcardPattern | RestPattern | ReferenceP...
The Rust Reference Book 2024-01-01 ~26 min read
doc.rust-lang.org
_ expressions UnderscoreExpression -> `_` Underscore expressions, denoted with the symbol _, are used to signify a placeholder in a destructuring assignment. They may only appear in the left-hand side of an assignment. Note that this is dis...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
Await expressions AwaitExpression -> Expression `.` `await` An await expression is a syntactic construct for suspending a computation provided by an implementation of std::future::IntoFuture until the given future is ready to produce a valu...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
return expressions ReturnExpression -> `return` Expression? Return expressions are denoted with the keyword return. Evaluating a return expression moves its argument into the designated output location for the current function call, destroy...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
match expressions MatchExpression -> `match` Scrutinee `{` InnerAttribute* MatchArms? `}` Scrutinee -> Expression _except [StructExpression]_ MatchArms -> ( MatchArm `=>` ( ExpressionWithoutBlock `,` | ExpressionWithBlock `,`? ) )* MatchArm...
The Rust Reference Book 2024-01-01 ~6 min read
doc.rust-lang.org
if expressions IfExpression -> `if` Conditions BlockExpressionNoInnerAttributes (`else` ( BlockExpressionNoInnerAttributes | IfExpression ) )? Conditions -> Expression _except [StructExpression]_ | LetChain LetChain -> LetChainCondition ( `...
The Rust Reference Book 2024-01-01 ~4 min read
doc.rust-lang.org
Range expressions RangeExpression -> RangeExpr | RangeFromExpr | RangeToExpr | RangeFullExpr | RangeInclusiveExpr | RangeToInclusiveExpr RangeExpr -> Expression `..` Expression RangeFromExpr -> Expression `..` RangeToExpr -> `..` Expression...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
Loops and other breakable expressions LoopExpression -> LoopLabel? ( InfiniteLoopExpression | PredicateLoopExpression | IteratorLoopExpression | LabelBlockExpression ) Rust supports four loop expressions: • A loop expression denotes an infi...
The Rust Reference Book 2024-01-01 ~8 min read
doc.rust-lang.org
Closure expressions ClosureExpression -> `async`?[^cl-async-edition] `move`? ( `||` | `|` ClosureParameters? `|` ) (Expression | `->` TypeNoBounds BlockExpression) ClosureParameters -> ClosureParam (`,` ClosureParam)* `,`? ClosureParam -> O...
The Rust Reference Book 2024-01-01 ~2 min read
doc.rust-lang.org
Field access expressions FieldExpression -> Expression `.` IDENTIFIER A field expression is a place expression that evaluates to the location of a field of a struct or union. When the operand is mutable, the field expression is also mutable...
The Rust Reference Book 2024-01-01 ~1 min read
doc.rust-lang.org
Method-call expressions MethodCallExpression -> Expression `.` PathExprSegment `(`CallParams? `)` A method call consists of an expression (the receiver) followed by a single dot, an expression path segment, and a parenthesized expression-li...
The Rust Reference Book 2024-01-01 ~3 min read
doc.rust-lang.org
Call expressions CallExpression -> Expression `(` CallParams? `)` CallParams -> Expression ( `,` Expression )* `,`? A call expression calls a function. The syntax of a call expression is an expression, called the function operand, followed...
The Rust Reference Book 2024-01-01 ~2 min read
doc.rust-lang.org
Struct expressions StructExpression -> PathInExpression `{` (StructExprFields | StructBase)? `}` StructExprFields -> StructExprField (`,` StructExprField)* (`,` StructBase | `,`?) StructExprField -> OuterAttribute* ( IDENTIFIER | (IDENTIFIE...
The Rust Reference Book 2024-01-01 ~3 min read
doc.rust-lang.org
Tuple and tuple indexing expressions Tuple expressions TupleExpression -> `(` TupleElements? `)` TupleElements -> ( Expression `,` )+ Expression? A tuple expression constructs tuple values. The syntax for tuple expressions is a parenthesize...
The Rust Reference Book 2024-01-01 ~2 min read
doc.rust-lang.org
Array and array index expressions Array expressions ArrayExpression -> `[` ArrayElements? `]` ArrayElements -> Expression ( `,` Expression )* `,`? | Expression `;` Expression Array expressions construct arrays. Array expressions come in two...
The Rust Reference Book 2024-01-01 ~3 min read
doc.rust-lang.org
Grouped expressions GroupedExpression -> `(` Expression `)` A parenthesized expression wraps a single expression, evaluating to that expression. The syntax for a parenthesized expression is a (, then an expression, called the enclosed opera...
The Rust Reference Book 2024-01-01 ~1 min read
"Ownership is hard. It indeed is. And you managed to do that exact hard thing by hand, without any mechanical checks. (Or so you think.)"

Search tips

Type anything to search across articles, videos (including conference talks), podcasts, research, crates, and Rust API documentation. These operators give you finer control — click an example to try it.

Find pages containing all your words. Pages where the words appear together rank higher.
Quote part of your query to keep those words together as an exact phrase within a larger search.
Wrap the whole query in quotes for a verbatim search that matches text exactly, punctuation and all — perfect for Rust syntax. Needs at least 3 characters.
Put ! first to open the top result immediately. Quote the whole query for a literal leading bang, as in '!Send'. Bangs elsewhere, such as println!, stay literal. Browser and launcher shortcuts can invoke this directly. See search integrations.
Limit results to a single site. Works on its own () too. One site: per search.

Use the tabs and filters above the results to narrow by content type, publication year, and sort order.