Trait std::marker::Send
pub unsafe auto trait Send { }
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.
Implementations on Foreign Types
impl Send for Argument
impl Send for FormatSpec
impl Send for Alignment
impl Send for Count
Implementors
impl !Send for Args
impl !Send for ArgsOs
impl Send for std::sync::Once
impl Send for Waker
impl<'_> Send for std::string::Drain<'_>
impl<'_, T, A> Send for std::collections::vec_deque::Drain<'_, T, A> where
T: Send,
A: Allocator + Send,
impl<'a> Send for IoSlice<'a>
impl<'a> Send for IoSliceMut<'a>
NonNull
pointers are not Send
because the data they reference may be aliased.
impl<T> Send for std::iter::Empty<T>
impl<T> Send for AtomicPtr<T>
impl<T> Send for JoinHandle<T>
impl<T: Send> Send for SyncOnceCell<T>
impl<T: Send> Send for Receiver<T>
impl<T: Send> Send for Sender<T>
impl<T: Send> Send for SyncSender<T>
impl<T: ?Sized + Send> Send for Mutex<T>
impl<T: ?Sized + Send> Send for RwLock<T>
impl<T: ?Sized> !Send for MutexGuard<'_, T>
impl<T: ?Sized> !Send for RwLockReadGuard<'_, T>
impl<T: ?Sized> !Send for RwLockWriteGuard<'_, T>
Auto implementors
impl !Send for Vars
impl !Send for VarsOs
impl !Send for RawWaker
impl Send for BacktraceStatus
impl Send for std::cmp::Ordering
impl Send for TryReserveErrorKind
impl Send for Infallible
impl Send for VarError
impl Send for c_void
impl Send for std::fmt::Alignment
impl Send for ErrorKind
impl Send for SeekFrom
impl Send for IpAddr
impl Send for Ipv6MulticastScope
impl Send for Shutdown
impl Send for std::net::SocketAddr
impl Send for FpCategory
impl Send for IntErrorKind
impl Send for AncillaryError
impl Send for SearchStep
impl Send for std::sync::atomic::Ordering
impl Send for RecvTimeoutError
impl Send for TryRecvError
impl Send for bool
impl Send for char
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 [u8]
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 usize
impl Send for AllocError
impl Send for Global
impl Send for Layout
impl Send for LayoutError
impl Send for System
impl Send for TypeId
impl Send for TryFromSliceError
impl Send for std::ascii::EscapeDefault
impl Send for Backtrace
impl Send for BacktraceFrame
impl Send for BorrowError
impl Send for BorrowMutError
impl Send for CharTryFromError
impl Send for DecodeUtf16Error
impl Send for std::char::EscapeDebug
impl Send for std::char::EscapeDefault
impl Send for std::char::EscapeUnicode
impl Send for ParseCharError
impl Send for ToLowercase
impl Send for ToUppercase
impl Send for DefaultHasher
impl Send for RandomState
impl Send for TryReserveError
impl Send for JoinPathsError
impl Send for CStr
impl Send for CString
impl Send for FromBytesWithNulError
impl Send for FromVecWithNulError
impl Send for IntoStringError
impl Send for NulError
impl Send for OsStr
impl Send for OsString
impl Send for std::fmt::Error
impl Send for DirBuilder
impl Send for DirEntry
impl Send for File
impl Send for FileType
impl Send for Metadata
impl Send for OpenOptions
impl Send for Permissions
impl Send for ReadDir
impl Send for SipHasher
impl Send for std::io::Empty
impl Send for std::io::Error
impl Send for Initializer
impl Send for std::io::Repeat
impl Send for Sink
impl Send for Stderr
impl Send for Stdin
impl Send for Stdout
impl Send for WriterPanicked
impl Send for AddrParseError
impl Send for Ipv4Addr
impl Send for Ipv6Addr
impl Send for SocketAddrV4
impl Send for SocketAddrV6
impl Send for TcpListener
impl Send for TcpStream
impl Send for UdpSocket
impl Send for NonZeroI8
impl Send for NonZeroI16
impl Send for NonZeroI32
impl Send for NonZeroI64
impl Send for NonZeroI128
impl Send for NonZeroIsize
impl Send for NonZeroU8
impl Send for NonZeroU16
impl Send for NonZeroU32
impl Send for NonZeroU64
impl Send for NonZeroU128
impl Send for NonZeroUsize
impl Send for ParseFloatError
impl Send for ParseIntError
impl Send for TryFromIntError
impl Send for RangeFull
impl Send for PidFd
impl Send for stat
impl Send for OwnedFd
impl Send for std::os::unix::net::SocketAddr
impl Send for SocketCred
impl Send for UCred
impl Send for UnixDatagram
impl Send for UnixListener
impl Send for UnixStream
impl Send for OwnedSocket
impl Send for Path
impl Send for PathBuf
impl Send for StripPrefixError
impl Send for Child
impl Send for ChildStderr
impl Send for ChildStdin
impl Send for ChildStdout
impl Send for Command
impl Send for ExitCode
impl Send for ExitStatus
impl Send for ExitStatusError
impl Send for Output
impl Send for Stdio
impl Send for ParseBoolError
impl Send for Utf8Error
impl Send for FromUtf8Error
impl Send for FromUtf16Error
impl Send for String
impl Send for AtomicBool
impl Send for AtomicI8
impl Send for AtomicI16
impl Send for AtomicI32
impl Send for AtomicI64
impl Send for AtomicIsize
impl Send for AtomicU8
impl Send for AtomicU16
impl Send for AtomicU32
impl Send for AtomicU64
impl Send for AtomicUsize
impl Send for RecvError
impl Send for Barrier
impl Send for BarrierWaitResult
impl Send for Condvar
impl Send for OnceState
impl Send for WaitTimeoutResult
impl Send for RawWakerVTable
impl Send for AccessError
impl Send for Builder
impl Send for Thread
impl Send for ThreadId
impl Send for Duration
impl Send for Instant
impl Send for SystemTime
impl Send for SystemTimeError
impl Send for PhantomPinned
impl<'a> !Send for std::error::Chain<'a>
impl<'a> !Send for Arguments<'a>
impl<'a> !Send for Formatter<'a>
impl<'a> !Send for StderrLock<'a>
impl<'a> !Send for StdinLock<'a>
impl<'a> !Send for StdoutLock<'a>
impl<'a> !Send for PanicInfo<'a>
impl<'a> Send for AncillaryData<'a>
impl<'a> Send for Component<'a>
impl<'a> Send for Prefix<'a>
impl<'a> Send for SplitPaths<'a>
impl<'a> Send for std::net::Incoming<'a>
impl<'a> Send for std::os::unix::net::Incoming<'a>
impl<'a> Send for Messages<'a>
impl<'a> Send for ScmCredentials<'a>
impl<'a> Send for ScmRights<'a>
impl<'a> Send for SocketAncillary<'a>
impl<'a> Send for EncodeWide<'a>
impl<'a> Send for Location<'a>
impl<'a> Send for Ancestors<'a>
impl<'a> Send for Components<'a>
impl<'a> Send for Display<'a>
impl<'a> Send for std::path::Iter<'a>
impl<'a> Send for PrefixComponent<'a>
impl<'a> Send for CommandArgs<'a>
impl<'a> Send for CommandEnvs<'a>
impl<'a> Send for CharSearcher<'a>
impl<'a> Send for std::str::Bytes<'a>
impl<'a> Send for CharIndices<'a>
impl<'a> Send for Chars<'a>
impl<'a> Send for EncodeUtf16<'a>
impl<'a> Send for std::str::EscapeDebug<'a>
impl<'a> Send for std::str::EscapeDefault<'a>
impl<'a> Send for std::str::EscapeUnicode<'a>
impl<'a> Send for std::str::Lines<'a>
impl<'a> Send for LinesAny<'a>
impl<'a> Send for SplitAsciiWhitespace<'a>
impl<'a> Send for SplitWhitespace<'a>
impl<'a> Send for Context<'a>
impl<'a, 'b> !Send for DebugList<'a, 'b>
impl<'a, 'b> !Send for DebugMap<'a, 'b>
impl<'a, 'b> !Send for DebugSet<'a, 'b>
impl<'a, 'b> !Send for DebugStruct<'a, 'b>
impl<'a, 'b> !Send for DebugTuple<'a, 'b>
impl<'a, 'b> Send for CharSliceSearcher<'a, 'b>
impl<'a, 'b> Send for StrSearcher<'a, 'b>
impl<'a, 'f> !Send for VaList<'a, 'f>
impl<'a, A> Send for std::option::Iter<'a, A> where
A: Sync,
impl<'a, A> Send for std::option::IterMut<'a, A> where
A: Send,
impl<'a, F> Send for CharPredicateSearcher<'a, F> where
F: Send,
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::OccupiedEntry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for std::collections::btree_map::OccupiedError<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V, F> Send for std::collections::btree_map::DrainFilter<'a, K, V, F> where
F: Send,
K: Send,
V: Send,
impl<'a, K, V, F> Send for std::collections::hash_map::DrainFilter<'a, K, V, F> where
F: Send,
K: Send,
V: Send,
impl<'a, T> !Send for std::sync::mpsc::Iter<'a, T>
impl<'a, T> !Send for TryIter<'a, T>
impl<'a, T> Send for std::collections::binary_heap::Drain<'a, T> where
T: Send,
impl<'a, T> Send for DrainSorted<'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 PeekMut<'a, T> where
T: Send,
impl<'a, T> Send for std::collections::btree_set::Difference<'a, T> where
T: Sync,
impl<'a, T> Send for std::collections::btree_set::Intersection<'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::SymmetricDifference<'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> Send for std::result::IterMut<'a, T> where
T: Send,
impl<'a, T> Send for Chunks<'a, T> where
T: Sync,
impl<'a, T> Send for ChunksExact<'a, T> where
T: Sync,
impl<'a, T> Send for ChunksExactMut<'a, T> where
T: Send,
impl<'a, T> Send for ChunksMut<'a, T> where
T: Send,
impl<'a, T> Send for RChunks<'a, T> where
T: Sync,
impl<'a, T> Send for RChunksExact<'a, T> where
T: Sync,
impl<'a, T> Send for RChunksExactMut<'a, T> where
T: Send,
impl<'a, T> Send for RChunksMut<'a, T> where
T: Send,
impl<'a, T> Send for Windows<'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::SymmetricDifference<'a, T, S> where
S: Sync,
T: Sync,
impl<'a, T, const N: usize> !Send for ArrayWindows<'a, T, N>
impl<'a, T, const N: usize> Send for ArrayChunks<'a, T, N> where
T: Sync,
impl<'a, T, const N: usize> Send for ArrayChunksMut<'a, T, N> where
T: Send,
impl<'b, T> !Send for Ref<'b, T>
impl<'b, T> !Send for RefMut<'b, T>
impl<'f> !Send for VaListImpl<'f>
impl<'fd> Send for BorrowedFd<'fd>
impl<'socket> Send for BorrowedSocket<'socket>
impl<A> Send for std::iter::Repeat<A> where
A: Send,
impl<A> Send for std::option::IntoIter<A> where
A: Send,
impl<B> Send for std::io::Lines<B> where
B: Send,
impl<B> Send for std::io::Split<B> where
B: Send,
impl<F> Send for PollFn<F> where
F: Send,
impl<F> Send for FromFn<F> where
F: Send,
impl<F> Send for OnceWith<F> where
F: Send,
impl<F> Send for RepeatWith<F> where
F: Send,
impl<H> Send for BuildHasherDefault<H> where
H: Send,
impl<I> Send for DecodeUtf16<I> where
I: Send,
impl<I> Send for Cloned<I> where
I: Send,
impl<I> Send for Copied<I> where
I: Send,
impl<I> Send for Cycle<I> where
I: Send,
impl<I> Send for Enumerate<I> where
I: Send,
impl<I> Send for Fuse<I> where
I: Send,
impl<I> Send for Skip<I> where
I: Send,
impl<I> Send for StepBy<I> where
I: Send,
impl<I> Send for std::iter::Take<I> where
I: Send,
impl<I> Send for FromIter<I> where
I: Send,
impl<I, U, F> Send for FlatMap<I, U, F> where
F: Send,
I: Send,
<U as IntoIterator>::IntoIter: Send,
impl<Idx> Send for std::ops::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<K> Send for std::collections::hash_set::IntoIter<K> where
K: Send,
impl<P> Send for Pin<P> where
P: Send,
impl<R> Send for BufReader<R> where
R: Send,
impl<R> Send for std::io::Bytes<R> where
R: Send,
impl<T> Send for Bound<T> where
T: Send,
impl<T> Send for Option<T> where
T: Send,
impl<T> Send for TryLockError<T> where
T: Send,
impl<T> Send for TrySendError<T> where
T: Send,
impl<T> Send for Poll<T> where
T: Send,
impl<T> Send for [T] where
T: Send,
impl<T> Send for Reverse<T> where
T: Send,
impl<T> Send for std::collections::binary_heap::IntoIter<T> where
T: Send,
impl<T> Send for IntoIterSorted<T> where
T: Send,
impl<T> Send for std::collections::btree_set::IntoIter<T> where
T: Send,
impl<T> Send for std::collections::linked_list::IntoIter<T> where
T: Send,
impl<T> Send for BTreeSet<T> where
T: Send,
impl<T> Send for BinaryHeap<T> where
T: Send,
impl<T> Send for Pending<T> where
T: Send,
impl<T> Send for Ready<T> where
T: Send,
impl<T> Send for std::io::Cursor<T> where
T: Send,
impl<T> Send for std::io::Take<T> where
T: Send,
impl<T> Send for std::iter::Once<T> where
T: Send,
impl<T> Send for Rev<T> where
T: Send,
impl<T> Send for OnceCell<T> where
T: Send,
impl<T> Send for Discriminant<T>
impl<T> Send for Saturating<T> where
T: Send,
impl<T> Send for Wrapping<T> where
T: Send,
impl<T> Send for AssertUnwindSafe<T> where
T: Send,
impl<T> Send for std::result::IntoIter<T> where
T: Send,
impl<T> Send for std::sync::mpsc::IntoIter<T> where
T: Send,
impl<T> Send for SendError<T> where
T: Send,
impl<T> Send for PoisonError<T> where
T: Send,
impl<T> Send for LocalKey<T>
impl<T> Send for MaybeUninit<T> where
T: Send,
impl<T, const N: usize> Send for [T; N] where
T: Send,
impl<T, const N: usize> Send for std::array::IntoIter<T, N> where
T: Send,
impl<T: ?Sized> Send for UnsafeCell<T> where
T: Send,
impl<T: ?Sized> Send for ManuallyDrop<T> where
T: Send,
impl<T: ?Sized> Send for PhantomData<T> where
T: Send,
impl<W> Send for BufWriter<W> where
W: Send,
impl<W> Send for IntoInnerError<W> where
W: Send,
impl<W> Send for LineWriter<W> where
W: Send,
© 2010 The Rust Project Developers
Licensed under the Apache License, Version 2.0 or the MIT license, at your option.
https://doc.rust-lang.org/std/marker/trait.Send.html