scope-lock 0.3.1

Safely extend lifetimes
Documentation

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]: