Struct rustc_data_structures::sync::WorkerLocal
source · pub struct WorkerLocal<T>(OneThread<T>);
Tuple Fields
0: OneThread<T>
Implementations
sourceimpl<T> WorkerLocal<T>
impl<T> WorkerLocal<T>
sourcepub fn new<F: FnMut(usize) -> T>(f: F) -> WorkerLocal<T>
pub fn new<F: FnMut(usize) -> T>(f: F) -> WorkerLocal<T>
Creates a new worker local where the initial
closure computes the
value this worker local should take for each thread in the thread pool.
sourcepub fn into_inner(self) -> Vec<T>
pub fn into_inner(self) -> Vec<T>
Returns the worker-local value for each thread
Trait Implementations
sourceimpl<T: Debug> Debug for WorkerLocal<T>
impl<T: Debug> Debug for WorkerLocal<T>
Auto Trait Implementations
impl<T> RefUnwindSafe for WorkerLocal<T>where
T: RefUnwindSafe,
impl<T> Send for WorkerLocal<T>where
T: Send,
impl<T> Sync for WorkerLocal<T>where
T: Sync,
impl<T> Unpin for WorkerLocal<T>where
T: Unpin,
impl<T> UnwindSafe for WorkerLocal<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<'a, T> Captures<'a> for Twhere
T: ?Sized,
impl<T> Erased for T
Layout
Note: Unable to compute type layout, possibly due to this type having generic parameters. Layout can only be computed for concrete, fully-instantiated types.