Understanding Closures in Rust.
- Closures are a combination of a function pointer (
fn) and a context.
- A closure with no context is just a function pointer.
- A closure which has an immutable context belongs to
- A closure which has a mutable context belongs to
- A closure that owns its context belongs to