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.
impl<'a, E> Send for StrDeserializer<'a, E> where
E: Send,
impl<'de, E> Send for BorrowedStrDeserializer<'de, E> where
E: Send,
impl<'a, 'de, E> Send for FlatMapDeserializer<'a, 'de, E> where
E: Send,
impl<'a, 'de, E> Send for FlatMapAccess<'a, 'de, E> where
E: Send,
impl<'a, 'de, E> Send for FlatStructAccess<'a, 'de, E> where
E: Send,
impl<'a, 'de, E> Send for FlatInternallyTaggedAccess<'a, 'de, E> where
E: Send,
impl<'de> Send for Content<'de>
impl<'de, E> Send for ContentDeserializer<'de, E> where
E: Send,
impl<'a, 'de, E> Send for ContentRefDeserializer<'a, 'de, E> where
E: Send,
impl<'de, E> Send for EnumDeserializer<'de, E> where
E: Send,
impl<'a> Send for InternallyTaggedUnitVisitor<'a>
impl Send for TagContentOtherField
impl Send for TagContentOtherFieldVisitor
impl Send for TagOrContentField
impl Send for TagOrContentFieldVisitor
impl<'de, T> Send for TaggedContentVisitor<'de, T> where
T: Send,
impl<'a> Send for UntaggedUnitVisitor<'a>
impl<'a, T> Send for InPlaceSeed<'a, T> where
T: Send,
impl<'a, M> Send for FlatMapSerializer<'a, M> where
M: Send,
impl<'a, M> Send for FlatMapSerializeMap<'a, M> where
M: Send,
impl<'a, M> Send for FlatMapSerializeStruct<'a, M> where
M: Send,
impl<'a, M> Send for FlatMapSerializeStructVariantAsMapValue<'a, M> where
M: Send,
NonNull
pointers are not Send
because the data they reference may be aliased.
impl<R, G, T> Send for ReentrantMutex<R, G, T> where
R: RawMutex + Send,
G: GetThreadId + Send,
T: Send + ?Sized,
impl<'a, R, T> Send for MappedRwLockWriteGuard<'a, R, T> where
R: 'a + RawRwLock,
T: 'a + Send + ?Sized,
<R as RawRwLock>::GuardMarker: Send,
impl<'a, R, T> Send for MappedMutexGuard<'a, R, T> where
R: 'a + RawMutex,
T: 'a + Send + ?Sized,
<R as RawMutex>::GuardMarker: Send,
impl<'a, R, T> Send for MappedRwLockReadGuard<'a, R, T> where
R: 'a + RawRwLock,
T: 'a + Sync + ?Sized,
<R as RawRwLock>::GuardMarker: Send,
impl<R, G> Send for RawReentrantMutex<R, G> where
R: RawMutex + Send,
G: GetThreadId + Send,
impl<'a, T> Send for Drain<'a, T> where
T: Send + Array,
impl<A> Send for SmallVec<A> where
A: Array,
<A as Array>::Item: Send,
impl<'_, K, V, S, A> Send for RawOccupiedEntryMut<'_, K, V, S, A> where
K: Send,
V: Send,
A: Send + Allocator + Clone,
impl<'_, K, V, S, A> Send for OccupiedEntry<'_, K, V, S, A> where
K: Send,
V: Send,
S: Send,
A: Send + Allocator + Clone,
impl<'_, K, V> Send for IterMut<'_, K, V> where
K: Send,
V: Send,