Skip to content

Glossary: Rust Beyond the Basics

closure

Also written: closures

A function without a name, written inline like `|x| x * 2`, that can use variables from the code around it.

Where the book teaches it

Related terms

capturemoveFn