Skip to content

Glossary: Software Design Patterns in Rust

move (closure)

Also written: move closure

A keyword that makes a closure take ownership of the values it uses. It is needed when a boxed closure outlives the function that made it, like percent_off's `pct`.

Where the book teaches it

Related terms

ClosureOwnership