2 releases

0.2.5 Jun 2, 2024
0.2.4 May 29, 2024
0.1.0 May 23, 2024

#1181 in Rust patterns

Download history 5/week @ 2024-09-23 3/week @ 2024-09-30 2/week @ 2024-10-07

356 downloads per month

MIT license

36KB
827 lines

Scope lock

Scope lock allows you to extend lifetime for certain kind of objects like closures to use them where larger lifetimes are required, like std::thread::spawn. Start from lock_scope.

Examples

Using boxes (requires allocation):

Using RefOnce:

Dependencies

~0.4–5MB
~11K SLoC