2 releases

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

#1026 in Rust patterns

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