Trait Send

1.0.0 · Source
pub unsafe auto trait Send { }
Expand description

Types that can be transferred across thread boundaries.

This trait is automatically implemented when the compiler determines it’s appropriate.

An example of a non-Send type is the reference-counting pointer rc::Rc. If two threads attempt to clone Rcs that point to the same reference-counted value, they might try to update the reference count at the same time, which is undefined behavior because Rc doesn’t use atomic operations. Its cousin sync::Arc does use atomic operations (incurring some overhead) and thus is Send.

See the Nomicon and the Sync trait for more details.

Implementors§

1.0.0 · Source§

impl !Send for Arguments<'_>

Source§

impl !Send for LocalWaker

1.26.0 · Source§

impl !Send for Args

1.26.0 · Source§

impl !Send for ArgsOs

1.6.0 · Source§

impl Send for alloc::string::Drain<'_>

Source§

impl Send for Bytes<'_>

1.36.0 · Source§

impl Send for Waker

Source§

impl Send for Collector

Source§

impl Send for Parker

Source§

impl Send for Unparker

1.44.0 · Source§

impl<'a> Send for IoSlice<'a>

1.44.0 · Source§

impl<'a> Send for IoSliceMut<'a>

Source§

impl<'a, 'b, K, Q, V, S, A> Send for OccupiedEntryRef<'a, 'b, K, Q, V, S, A>
where K: Send, Q: Sync + ?Sized, V: Send, S: Send, A: Send + Allocator + Clone,

Source§

impl<'a, R, T> Send for lock_api::mutex::MappedMutexGuard<'a, R, T>
where R: RawMutex + 'a, T: Send + 'a + ?Sized, <R as RawMutex>::GuardMarker: Send,

Source§

impl<'a, R, T> Send for lock_api::rwlock::MappedRwLockReadGuard<'a, R, T>
where R: RawRwLock + 'a, T: Sync + 'a + ?Sized, <R as RawRwLock>::GuardMarker: Send,

Source§

impl<'a, R, T> Send for lock_api::rwlock::MappedRwLockWriteGuard<'a, R, T>
where R: RawRwLock + 'a, T: Send + 'a + ?Sized, <R as RawRwLock>::GuardMarker: Send,

Source§

impl<'a, T> Send for smallvec::Drain<'a, T>
where T: Send + Array,

Source§

impl<A> Send for SmallVec<A>
where A: Array, <A as Array>::Item: Send,

Source§

impl<Dyn> Send for DynMetadata<Dyn>
where Dyn: ?Sized,

Source§

impl<K, V> Send for hashbrown::map::IterMut<'_, K, V>
where K: Send, V: Send,

Source§

impl<K, V, S, A> Send for OccupiedEntry<'_, K, V, S, A>
where K: Send, V: Send, S: Send, A: Send + Allocator + Clone,

Source§

impl<K, V, S, A> Send for RawOccupiedEntryMut<'_, K, V, S, A>
where K: Send, V: Send, S: Send, A: Send + Allocator + Clone,

Source§

impl<R, G> Send for RawReentrantMutex<R, G>
where R: RawMutex + Send, G: GetThreadId + Send,

Source§

impl<R, G, T> Send for ReentrantMutex<R, G, T>
where R: RawMutex + Send, G: GetThreadId + Send, T: Send + ?Sized,

Source§

impl<R, T> Send for lock_api::mutex::Mutex<R, T>
where R: RawMutex + Send, T: Send + ?Sized,

Source§

impl<R, T> Send for lock_api::rwlock::RwLock<R, T>
where R: RawRwLock + Send, T: Send + ?Sized,

1.0.0 · Source§

impl<T> !Send for *const T
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for *mut T
where T: ?Sized,

1.25.0 · Source§

impl<T> !Send for NonNull<T>
where T: ?Sized,

NonNull pointers are not Send because the data they reference may be aliased.

Source§

impl<T> !Send for std::sync::poison::mutex::MappedMutexGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for MutexGuard<'_, T>
where T: ?Sized,

A MutexGuard is not Send to maximize platform portablity.

On platforms that use POSIX threads (commonly referred to as pthreads) there is a requirement to release mutex locks on the same thread they were acquired. For this reason, MutexGuard must not implement Send to prevent it being dropped from another thread.

Source§

impl<T> !Send for std::sync::poison::rwlock::MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::poison::rwlock::MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for RwLockReadGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for RwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for ReentrantLockGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> Send for &T
where T: Sync + ?Sized,

Source§

impl<T> Send for ThinBox<T>
where T: Send + ?Sized,

ThinBox<T> is Send if T is Send because the data is owned.

1.0.0 · Source§

impl<T> Send for alloc::collections::linked_list::Iter<'_, T>
where T: Sync,

1.0.0 · Source§

impl<T> Send for alloc::collections::linked_list::IterMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for Cell<T>
where T: Send + ?Sized,

1.0.0 · Source§

impl<T> Send for RefCell<T>
where T: Send + ?Sized,

1.28.0 · Source§

impl<T> Send for NonZero<T>

1.31.0 · Source§

impl<T> Send for ChunksExactMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for ChunksMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for core::slice::iter::Iter<'_, T>
where T: Sync,

1.0.0 · Source§

impl<T> Send for core::slice::iter::IterMut<'_, T>
where T: Send,

1.31.0 · Source§

impl<T> Send for RChunksExactMut<'_, T>
where T: Send,

1.31.0 · Source§

impl<T> Send for RChunksMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for AtomicPtr<T>

Source§

impl<T> Send for std::sync::mpmc::Receiver<T>
where T: Send,

Source§

impl<T> Send for std::sync::mpmc::Sender<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for std::sync::mpsc::Receiver<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for std::sync::mpsc::Sender<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for SyncSender<T>
where T: Send,

1.70.0 · Source§

impl<T> Send for OnceLock<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for std::sync::poison::mutex::Mutex<T>
where T: Send + ?Sized,

T must be Send for a Mutex to be Send because it is possible to acquire the owned T from the Mutex via into_inner.

1.0.0 · Source§

impl<T> Send for std::sync::poison::rwlock::RwLock<T>
where T: Send + ?Sized,

Source§

impl<T> Send for ReentrantLock<T>
where T: Send + ?Sized,

1.29.0 · Source§

impl<T> Send for JoinHandle<T>

Source§

impl<T> Send for Injector<T>
where T: Send,

Source§

impl<T> Send for Stealer<T>
where T: Send,

Source§

impl<T> Send for Worker<T>
where T: Send,

Source§

impl<T> Send for Atomic<T>
where T: Pointable + Send + Sync + ?Sized,

Source§

impl<T> Send for AtomicCell<T>
where T: Send,

Source§

impl<T> Send for CachePadded<T>
where T: Send,

Source§

impl<T> Send for ShardedLock<T>
where T: Send + ?Sized,

Source§

impl<T> Send for ScopedJoinHandle<'_, T>

Source§

impl<T> Send for Bucket<T>

1.0.0 · Source§

impl<T, A> !Send for Rc<T, A>
where A: Allocator, T: ?Sized,

Source§

impl<T, A> !Send for UniqueRc<T, A>
where A: Allocator, T: ?Sized,

1.4.0 · Source§

impl<T, A> !Send for alloc::rc::Weak<T, A>
where A: Allocator, T: ?Sized,

Source§

impl<T, A> Send for Cursor<'_, T, A>
where T: Sync, A: Allocator + Sync,

Source§

impl<T, A> Send for CursorMut<'_, T, A>
where T: Send, A: Allocator + Send,

1.0.0 · Source§

impl<T, A> Send for LinkedList<T, A>
where T: Send, A: Allocator + Send,

1.6.0 · Source§

impl<T, A> Send for alloc::collections::vec_deque::drain::Drain<'_, T, A>
where T: Send, A: Allocator + Send,

Source§

impl<T, A> Send for UniqueArc<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

1.6.0 · Source§

impl<T, A> Send for alloc::vec::drain::Drain<'_, T, A>
where T: Send, A: Send + Allocator,

1.0.0 · Source§

impl<T, A> Send for IntoIter<T, A>
where T: Send, A: Allocator + Send,

Source§

impl<T, A> Send for RawDrain<'_, T, A>
where A: Allocator + Copy + Send, T: Send,

Source§

impl<T, A> Send for RawIntoIter<T, A>
where A: Allocator + Clone + Send, T: Send,

Source§

impl<T, A> Send for RawTable<T, A>
where A: Allocator + Clone + Send, T: Send,

1.0.0 · Source§

impl<T, A> Send for Arc<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

1.4.0 · Source§

impl<T, A> Send for rustc_data_structures::sync::Weak<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

Auto implementors§

§

impl Send for Ordering

§

impl Send for Lock

§

impl Send for FxHasher

§

impl Send for MaybeTempDir

§

impl Send for NoUndo

§

impl Send for rustc_data_structures::undo_log::Snapshot

§

impl Send for Unhasher

§

impl Send for NoError

§

impl Send for AtomicBool

§

impl Send for AtomicU32

§

impl Send for AtomicU64

§

impl Send for AtomicUsize

§

impl<D> Send for UndoLog<D>

§

impl<D, V, L> Send for SnapshotVec<D, V, L>
where V: Send, L: Send, D: Send,

§

impl<F> Send for OnDrop<F>
where F: Send,

§

impl<K> Send for VarValue<K>
where K: Send, <K as UnifyKey>::Value: Send,

§

impl<K, V> Send for StableMap<K, V>
where K: Send, V: Send,

§

impl<K, V, L> Send for InPlace<K, V, L>
where V: Send, L: Send, K: Send,

§

impl<S> Send for rustc_data_structures::snapshot_vec::Snapshot<S>
where S: Send,

§

impl<S> Send for rustc_data_structures::unify::Snapshot<S>
where <S as UnificationStore>::Snapshot: Send, S: Send,

§

impl<S> Send for UnificationTable<S>
where S: Send,

§

impl<T> Send for Frozen<T>
where T: Send,

§

impl<T> Send for StableSet<T>
where T: Send,

§

impl<T> Send for AtomicRef<T>
where T: Sync,

§

impl<T> Send for VecLog<T>
where T: Send,

§

impl<T> Send for WorkerLocal<T>
where T: Send,