pub struct ThreadLocal(/* private fields */);
Expand description
Marker that indicates that a value can currently only be shared in the same thread.
Using this marker causes the type to be !Send + !Sync
.
Trait Implementations§
Source§impl Clone for ThreadLocal
impl Clone for ThreadLocal
Source§fn clone(&self) -> ThreadLocal
fn clone(&self) -> ThreadLocal
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ThreadLocal
impl Debug for ThreadLocal
Source§impl Default for ThreadLocal
impl Default for ThreadLocal
Source§fn default() -> ThreadLocal
fn default() -> ThreadLocal
Returns the “default value” for a type. Read more
Source§impl Hash for ThreadLocal
impl Hash for ThreadLocal
Source§impl Ord for ThreadLocal
impl Ord for ThreadLocal
Source§fn cmp(&self, other: &ThreadLocal) -> Ordering
fn cmp(&self, other: &ThreadLocal) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for ThreadLocal
impl PartialEq for ThreadLocal
Source§impl PartialOrd for ThreadLocal
impl PartialOrd for ThreadLocal
impl Copy for ThreadLocal
impl Eq for ThreadLocal
impl LocalThreadOwnership for ThreadLocal
impl NonUniqueOwnership for ThreadLocal
impl Ownership for ThreadLocal
impl StructuralPartialEq for ThreadLocal
Auto Trait Implementations§
impl Freeze for ThreadLocal
impl RefUnwindSafe for ThreadLocal
impl !Send for ThreadLocal
impl !Sync for ThreadLocal
impl Unpin for ThreadLocal
impl UnwindSafe for ThreadLocal
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key
and return true
if they are equal.