Skip to main content

Send

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.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

1.26.0 · Source§

impl !Send for Args

1.26.0 · Source§

impl !Send for ArgsOs

1.0.0 · Source§

impl !Send for Arguments<'_>

Source§

impl !Send for LocalWaker

1.98.0 · Source§

impl !Send for VarsOs

Source§

impl Send for Bytes<'_>

1.6.0 · Source§

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

1.10.0 · Source§

impl Send for Location<'_>

1.0.0 · Source§

impl Send for TypeId

1.36.0 · Source§

impl Send for Waker

1.44.0 · Source§

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

1.44.0 · Source§

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

Source§

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

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 dafny_runtime::Weak<T, A>
where A: Allocator, T: ?Sized,

1.0.0 · Source§

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

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.6.0 · Source§

impl<T, A> Send for alloc::collections::vec_deque::drain::Drain<'_, T, A>
where T: Send, 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,

1.0.0 · Source§

impl<T, A> Send for LinkedList<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.4.0 · Source§

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

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,

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

Source§

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

A MutexGuard is not Send to maximize platform portability.

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.

1.0.0 · Source§

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

A MutexGuard is not Send to maximize platform portability.

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.

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 ReentrantLockGuard<'_, T>
where T: ?Sized,

Source§

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

1.0.0 · Source§

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

Source§

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

1.0.0 · Source§

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

1.0.0 · Source§

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

1.0.0 · Source§

impl<T> Send for Atomic<T>
where T: AtomicPrimitive,

1.0.0 · Source§

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

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 alloc::collections::linked_list::Iter<'_, T>
where T: Sync,

1.0.0 · Source§

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

1.0.0 · Source§

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

1.29.0 · Source§

impl<T> Send for JoinHandle<T>

Source§

impl<T> Send for std::sync::nonpoison::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::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.28.0 · Source§

impl<T> Send for NonZero<T>

1.70.0 · Source§

impl<T> Send for OnceLock<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,

Source§

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

1.0.0 · Source§

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

Source§

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

1.0.0 · Source§

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

Source§

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

1.0.0 · Source§

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

Source§

impl<T> Send for std::sync::mpmc::Sender<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,

Source§

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

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

Auto implementors§

§

impl !Send for AllocationTracker

§

impl !Send for DafnyInt

§

impl Send for DafnyChar

§

impl Send for DafnyCharUTF16

§

impl Send for Tuple0

§

impl<'a> !Send for Formatter<'a>

§

impl<A> !Send for LazyFieldWrapper<A>

§

impl<A> Send for FunctionWrapper<A>
where A: Send + ?Sized,

§

impl<A> Send for IntegerRange<A>
where A: Send,

§

impl<A> Send for IntegerRangeDown<A>
where A: Send,

§

impl<A> Send for IntegerRangeDownUnbounded<A>
where A: Send,

§

impl<A> Send for IntegerRangeUnbounded<A>
where A: Send,

§

impl<K, V> !Send for Map<K, V>

§

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

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19> Send for Tuple20<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18, T19>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send, T15: Send, T16: Send, T17: Send, T18: Send, T19: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18> Send for Tuple19<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17, T18>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send, T15: Send, T16: Send, T17: Send, T18: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17> Send for Tuple18<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16, T17>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send, T15: Send, T16: Send, T17: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16> Send for Tuple17<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send, T15: Send, T16: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15> Send for Tuple16<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send, T15: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14> Send for Tuple15<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send, T14: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> Send for Tuple14<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send, T13: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12> Send for Tuple13<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send, T12: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11> Send for Tuple12<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send, T11: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Send for Tuple11<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9, T10>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send, T10: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9> Send for Tuple10<T0, T1, T2, T3, T4, T5, T6, T7, T8, T9>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send, T9: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7, T8> Send for Tuple9<T0, T1, T2, T3, T4, T5, T6, T7, T8>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send, T8: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6, T7> Send for Tuple8<T0, T1, T2, T3, T4, T5, T6, T7>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send, T7: Send,

§

impl<T0, T1, T2, T3, T4, T5, T6> Send for Tuple7<T0, T1, T2, T3, T4, T5, T6>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send, T6: Send,

§

impl<T0, T1, T2, T3, T4, T5> Send for Tuple6<T0, T1, T2, T3, T4, T5>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send, T5: Send,

§

impl<T0, T1, T2, T3, T4> Send for Tuple5<T0, T1, T2, T3, T4>
where T0: Send, T1: Send, T2: Send, T3: Send, T4: Send,

§

impl<T0, T1, T2, T3> Send for Tuple4<T0, T1, T2, T3>
where T0: Send, T1: Send, T2: Send, T3: Send,

§

impl<T0, T1, T2> Send for Tuple3<T0, T1, T2>
where T0: Send, T1: Send, T2: Send,

§

impl<T0, T1> Send for Tuple2<T0, T1>
where T0: Send, T1: Send,

§

impl<T0> Send for Tuple1<T0>
where T0: Send,

§

impl<T, F> Send for Lazy<T, F>
where F: Send, T: Send,

§

impl<T> !Send for Object<T>

§

impl<T> !Send for Ptr<T>

§

impl<T> !Send for Sequence<T>

§

impl<T> !Send for SequenceIter<T>

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

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

§

impl<V> !Send for Multiset<V>

§

impl<V> !Send for Set<V>