pub fn with<R, F>(&'static self, cb: F) -> R where
        F: FnOnce(&T) -> R
    {
        unsafe {
            let ptr = (self.inner)().get();
            assert!(!ptr.is_null(), "cannot access a scoped thread local \
                                     variable without calling `set` first");
            cb(&*ptr)
        }
    }
/// Gets a value out of this scoped variable.
///
/// This function takes a closure which receives the value of this
/// variable.
///
/// # Panics
///
/// This function will panic if `set` has not previously been called.
///
/// # Examples
///
/// ```no_run
/// #![feature(scoped_tls)]
///
/// scoped_thread_local!(static FOO: u32);
///
/// FOO.with(|slot| {
///     // work with `slot`
/// });
/// ```
Gets a value out of this scoped variable.
This function takes a closure which receives the value of this
variable.
Gets a value out of this scoped variable . This function takes a closure which receives the value of this variable .
pub fn with<R, F>(&'static self, cb: F) -> R where
        F: FnOnce(&T) -> R
    {
        unsafe {
            let ptr = (self.inner)().get();
            assert!(!ptr.is_null(), "cannot access a scoped thread local \
                                     variable without calling `set` first");
            cb(&*ptr)
        }
    }
pub fn with < R , F > ( & ' static self , cb : F ) -> R where F : FnOnce ( & T ) -> R { unsafe { let ptr = ( self . inner ) ( ) . get ( ) ; assert ! ( ptr is_null ( ) " \
 " ) ; cb ( & * ptr ) } }
Gets a value out of this scoped variable.
Gets a value out of this scoped variable .
&'static self
cb
F
panics
This function will panic if `set` has not previously been called.
This function will panic if ` set ` has not previously been called .
examples
None
![feature(scoped_tls)]
scoped_thread_local!(static FOO: u32).


scoped_thread_local! ( static FOO : u32 ) .