Registry / utility / closure

closure

JSON →
library0.3.0rscratesunverified

A macro for capturing variables on a per variable basis in closures.

# Cargo.toml [dependencies] closure = "0.3.0"
INSTALL
IMPORT
SIG · CLOSURE
C
closure
utilityrustv0.3.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

closure
use closure::closure;

Creates a closure that captures only the specified variable.

use closure::closure; fn main() { let x = 5; let add_x = closure!(move x, |y: i32| y + x); println!("{}", add_x(3)); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.3.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
closure — cargo add closure · libregistry