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 Rc
s 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 for more details.
This is supported on Windows only.
This is supported on Windows only.
This is supported on Windows only.
impl<'_, T> Send for std::collections::linked_list::Cursor<'_, T> where
T: Sync,
impl<'_, T> Send for std::collections::linked_list::Iter<'_, T> where
T: Sync,
impl<'_, T> Send for std::collections::linked_list::IterMut<'_, T> where
T: Send,
impl<'_, T> Send for std::collections::vec_deque::IterMut<'_, T> where
T: Send,
NonNull
pointers are not Send
because the data they reference may be aliased.
impl<'a, A> Send for std::option::Iter<'a, A> where
A: Sync,
impl<'a, K> Send for std::collections::hash_set::Drain<'a, K> where
K: Send,
impl<'a, K> Send for std::collections::hash_set::Iter<'a, K> where
K: Sync,
impl<'a, K, V> Send for std::collections::btree_map::Entry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for std::collections::hash_map::Entry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for std::collections::btree_map::Iter<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::btree_map::Keys<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::btree_map::Range<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::btree_map::Values<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::hash_map::Drain<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for std::collections::hash_map::Iter<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::hash_map::Keys<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for std::collections::hash_map::Values<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, T> !Send for std::sync::mpsc::Iter<'a, T>
impl<'a, T> Send for std::collections::binary_heap::Drain<'a, T> where
T: Send,
impl<'a, T> Send for std::collections::binary_heap::Iter<'a, T> where
T: Sync,
impl<'a, T> Send for std::collections::btree_set::Iter<'a, T> where
T: Sync,
impl<'a, T> Send for std::collections::btree_set::Range<'a, T> where
T: Sync,
impl<'a, T> Send for std::collections::btree_set::Union<'a, T> where
T: Sync,
impl<'a, T> Send for std::collections::vec_deque::Iter<'a, T> where
T: Sync,
impl<'a, T> Send for std::result::Iter<'a, T> where
T: Sync,
impl<'a, T, F> !Send for std::collections::linked_list::DrainFilter<'a, T, F>
impl<'a, T, S> Send for std::collections::hash_set::Union<'a, T, S> where
S: Sync,
T: Sync,