2 releases

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

#989 in Rust patterns

Download history 289/week @ 2024-05-18 385/week @ 2024-05-25 187/week @ 2024-06-01 11/week @ 2024-06-08 1/week @ 2024-06-15

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–5.5MB
~11K SLoC