Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Keyword Reference

KeywordUsage
andLogical AND (short-circuit): x and y
constCompile-time constant: const N: i64 = 42
ctlControl effect operation (captures continuation)
effectDeclare an algebraic effect
enumDeclare an enumeration type
falseBoolean literal
finalFinal effect operation (never resumes)
fnDeclare a function, or a tail-resumptive effect operation
forTrait implementation target: impl Trait for Type
handlerDefine an effect handler
ignotPackage/crate root in paths
implImplement methods or traits for a type
letBind a value to a name
loopFunctional loop with accumulators
matchPattern matching on a value
modDeclare a module
notLogical NOT: not x
orLogical OR (short-circuit): x or y
pvtMark an item as private (public by default)
recurJump back to enclosing loop with new values
resumeResume continuation in ctl handler: resume(value)
returnReturn a value from a function early
SelfThe implementing type in traits/impls
selfThe receiver in methods, or current module in paths
structDeclare a struct type
superParent module in paths
traitDeclare a trait
trueBoolean literal
typeDeclare a type alias
useImport items from a module
whenConditional expression or match guard
whereIntroduce type bounds on generic parameters
withInstall an effect handler, or declare supertraits/supereffects

Reserved Symbols

SymbolUsage
@Intrinsic prefix: @add(x, y)
?Try/error propagation: expr?
#[...]Attribute annotation
!(...)Effect declaration on functions: !(IO + State)
|...|Lambda parameters: |x| x + 1
::Path separator: Foo::bar
..Spread in struct literals, range in patterns
->Return type separator
_Wildcard pattern