Trait core::marker::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 for more details.

Implementors

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

impl<T: Send> Send for LinkedList<T>

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

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

impl<T: Sync> Send for Cursor<'_, T>

impl<T: Send> Send for CursorMut<'_, T>

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

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

impl<T: ?Sized> !Send for Rc<T>

impl<T: ?Sized> !Send for Weak<T>

impl Send for Drain<'_>

impl<T: ?Sized + Sync + Send> Send for Arc<T>

impl<T: ?Sized + Sync + Send> Send for Weak<T>

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

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

impl !Send for TokenStream

impl !Send for LexError

impl !Send for ExpandError

impl !Send for Span

impl !Send for LineColumn

impl !Send for TokenTree

impl !Send for Group

impl !Send for Punct

Auto implementors

impl Send for Global

impl<T: ?Sized, A> Send for Box<T, A> where
    A: Send,
    T: Send

impl<'a, B: ?Sized> Send for Cow<'a, B> where
    B: Sync,
    <B as ToOwned>::Owned: Send

impl<T> Send for BinaryHeap<T> where
    T: Send

impl<'a, T> Send for PeekMut<'a, T> where
    T: Send

impl<'a, T> Send for Iter<'a, T> where
    T: Sync

impl<T> Send for IntoIter<T> where
    T: Send

impl<T> Send for IntoIterSorted<T> where
    T: Send

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

impl<'a, T> Send for DrainSorted<'a, T> where
    T: Send

impl<'a, K, V> Send for Entry<'a, K, V> where
    K: Send,
    V: Send

impl<'a, K, V> Send for VacantEntry<'a, K, V> where
    K: Send,
    V: Send

impl<'a, K, V> Send for OccupiedEntry<'a, K, V> where
    K: Send,
    V: Send

impl<'a, K, V> Send for OccupiedError<'a, K, V> where
    K: Send,
    V: Send

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

impl<'a, K, V> Send for Iter<'a, K, V> where
    K: Sync,
    V: Sync

impl<'a, K, V> Send for IterMut<'a, K, V> where
    K: Send,
    V: Send

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

impl<'a, K, V> Send for Keys<'a, K, V> where
    K: Sync,
    V: Sync

impl<'a, K, V> Send for Values<'a, K, V> where
    K: Sync,
    V: Sync

impl<'a, K, V> Send for ValuesMut<'a, K, V> where
    K: Send,
    V: Send

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

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

impl<'a, K, V> Send for Range<'a, K, V> where
    K: Sync,
    V: Sync

impl<'a, K, V> Send for RangeMut<'a, K, V> where
    K: Send,
    V: Send

impl<'a, K, V, F> Send for DrainFilter<'a, K, V, F> where
    F: Send,
    K: Send,
    V: Send

impl<T> Send for BTreeSet<T> where
    T: Send

impl<'a, T> Send for Iter<'a, T> where
    T: Sync

impl<T> Send for IntoIter<T> where
    T: Send

impl<'a, T> Send for Range<'a, T> where
    T: Sync

impl<'a, T> Send for Difference<'a, T> where
    T: Sync

impl<'a, T> Send for SymmetricDifference<'a, T> where
    T: Sync

impl<'a, T> Send for Intersection<'a, T> where
    T: Sync

impl<'a, T> Send for Union<'a, T> where
    T: Sync

impl<'a, T, F> Send for DrainFilter<'a, T, F> where
    F: Send,
    T: Send

impl<T> Send for IntoIter<T> where
    T: Send

impl<'a, T, F> !Send for DrainFilter<'a, T, F>

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

impl<'a, T> Send for Iter<'a, T> where
    T: Sync

impl<T, A> Send for VecDeque<T, A> where
    A: Send,
    T: Send

impl Send for String

impl<'a, T, F, A> Send for DrainFilter<'a, T, F, A> where
    A: Send,
    F: Send,
    T: Send

impl<'a, I, A> Send for Splice<'a, I, A> where
    A: Send,
    I: Send,
    <I as Iterator>::Item: Send

impl<T, A> Send for Vec<T, A> where
    A: Send,
    T: Send

impl Send for Level

impl !Send for Diagnostic

impl !Send for IntoIter

impl !Send for SourceFile

impl Send for Delimiter

impl Send for Spacing

impl !Send for Ident

impl !Send for Literal

impl Send for TestOpts

impl Send for Metric

impl Send for MetricMap

impl Send for Concurrent

impl Send for Options

impl Send for RunIgnored

impl Send for RunStrategy

impl Send for ShouldPanic

impl Send for TestResult

impl Send for TestDesc

impl Send for TestId

impl Send for TestName

impl Send for TestType

impl Send for Bencher

impl Send for ColorConfig

impl Send for Summary

impl Send for NamePadding

impl Send for TestFn