Struct rustc_data_structures::sync::OneThread
source · pub struct OneThread<T> {
inner: T,
}
Expand description
A type which only allows its inner value to be used in one thread. It will panic if it is used on multiple threads.
Fields
inner: T
Implementations
Trait Implementations
Auto Trait Implementations
impl<T> RefUnwindSafe for OneThread<T>where
T: RefUnwindSafe,
impl<T> Send for OneThread<T>where
T: Send,
impl<T> Sync for OneThread<T>where
T: Sync,
impl<T> Unpin for OneThread<T>where
T: Unpin,
impl<T> UnwindSafe for OneThread<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.