[][src]Function thread_scoped_ref::scoped

pub fn scoped<T, TFn, TRet>(
    key: &'static LocalKey<Scope<T>>,
    value: &T,
    fun: TFn
) -> TRet where
    TFn: FnOnce() -> TRet,
    T: ?Sized

Execute a function scoped with given value reference.

See thread_scoped_ref for an example.