Send

Trait Send 

1.6.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 TypeId

1.10.0 · Source§

impl Send for Location<'_>

1.0.0 · Source§

impl<T: PointeeSized> !Send for *const T

1.0.0 · Source§

impl<T: PointeeSized> !Send for *mut T

1.25.0 · Source§

impl<T: PointeeSized> !Send for NonNull<T>

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

1.0.0 · Source§

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

1.0.0 · Source§

impl<T: Sync + PointeeSized> Send for &T

1.0.0 · Source§

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

Auto implementors§

§

impl Send for core::cmp::Ordering

§

impl Send for Infallible

§

impl Send for AtomicOrdering

§

impl Send for OneSidedRangeBound

§

impl Send for core::sync::atomic::Ordering

§

impl Send for bool

§

impl Send for f32

§

impl Send for f64

§

impl Send for i8

§

impl Send for i16

§

impl Send for i32

§

impl Send for i64

§

impl Send for i128

§

impl Send for isize

§

impl Send for !

§

impl Send for str

§

impl Send for u8

§

impl Send for u16

§

impl Send for u32

§

impl Send for u64

§

impl Send for u128

§

impl Send for ()

§

impl Send for usize

§

impl Send for Layout

§

impl Send for TryFromSliceError

§

impl Send for TryFromIntError

§

impl Send for RangeFull

§

impl Send for Alignment

§

impl Send for Utf8Error

§

impl Send for AtomicU32

§

impl Send for Duration

§

impl<'a> Send for PanicInfo<'a>

§

impl<'a, A> Send for core::option::Iter<'a, A>
where A: Sync,

§

impl<'a, A> Send for core::option::IterMut<'a, A>
where A: Send,

§

impl<A> Send for core::option::IntoIter<A>
where A: Send,

§

impl<B, C> Send for ControlFlow<B, C>
where C: Send, B: Send,

§

impl<Dyn> !Send for DynMetadata<Dyn>

§

impl<I> Send for Cloned<I>
where I: Send,

§

impl<I, F> Send for Map<I, F>
where I: Send, F: Send,

§

impl<Idx> Send for Range<Idx>
where Idx: Send,

§

impl<Idx> Send for RangeFrom<Idx>
where Idx: Send,

§

impl<Idx> Send for RangeInclusive<Idx>
where Idx: Send,

§

impl<Idx> Send for RangeTo<Idx>
where Idx: Send,

§

impl<Idx> Send for RangeToInclusive<Idx>
where Idx: Send,

§

impl<Ret, T> Send for fn(T₁, T₂, …, Tₙ) -> Ret

§

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

§

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

§

impl<T> Send for [T]
where T: Send,

§

impl<T> Send for (T₁, T₂, …, Tₙ)
where T: Send,

§

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

§

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

§

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

§

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

§

impl<T, E> Send for Result<T, E>
where T: Send, E: Send,

§

impl<T, const N: usize> Send for [T; N]
where T: Send,

§

impl<T, const N: usize> Send for core::array::IntoIter<T, N>
where T: Send,

§

impl<T, const N: usize> Send for [MaybeUninit<T>; N]
where T: Send,