Skip to content

Glossary: Software Design Patterns in Rust

Closure

Also written: closures

A small inline function that can use values from the code around it, such as `|s| s * 0.9`. Closures can be stored in variables and passed to other functions.

Where the book teaches it

Related terms

StrategyFunction pointermove (closure)