std::marker::Send - Rust
Description: API documentation for the Rust `Send` trait in crate `std`.
Keywords: rust, rustlang, rust-lang, Send

# Trait std::marker::Send 1.0.0 [−] [src]

    pub unsafe 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.

## Implementors

- [src]
  `impl<T> Send for std::sync::Weak<T> where
  T: Send + Sync + ?Sized,`
- [src]
  `impl<T> Send for Arc<T> where
  T: Send + Sync + ?Sized,`
- [src]
  `impl<'a, T> Send for std::vec::Drain<'a, T> where
  T: Send,`
- [src]
  `impl<'a, T> Send for std::collections::vec_deque::Drain<'a, T> where
  T: Send,`
- [src]
  `impl<'a, T> Send for std::collections::linked_list::IterMut<'a, T> where
  T: Send,`
- [src]
  `impl<'a> Send for std::string::Drain<'a>`
- [src]
  `impl<'a, T> Send for std::collections::linked_list::Iter<'a, T> where
  T: Sync,`
- [src]
  `impl<T> Send for LinkedList<T> where
  T: Send,`
- [src]
  `impl<T> !Send for Rc<T> where
  T: ?Sized,`
- [src]
  `impl<T> Send for IntoIter<T> where
  T: Send,`
- [src]
  `impl<T> !Send for std::rc::Weak<T> where
  T: ?Sized,`
- [src]
  `impl<T> !Send for *mut T where
  T: ?Sized,`
- [src]
  `impl<T> Send for Cell<T> where
  T: Send,`
- [src]
  `impl<T> Send for Unique<T> where
  T: Send + ?Sized,`
- [src]
  `impl<'a, T> Send for std::slice::IterMut<'a, T> where
  T: Send,`
- [src]
  `impl<T> Send for RefCell<T> where
  T: Send + ?Sized,`
- [src]
  `impl<T> !Send for *const T where
  T: ?Sized,`
- [src]
  `impl<'a, T> Send for &'a T where
  T: Sync + ?Sized,`
- [src]
  `impl<'a, T> Send for &'a mut T where
  T: Send + ?Sized,`
- [src]
  `impl<'a, T> Send for std::slice::Iter<'a, T> where
  T: Sync,`
- [src]
  `impl<T> !Send for Shared<T> where
  T: ?Sized,`
- [src]
  `impl<T> Send for AtomicPtr<T>`
- [src]
  `impl !Send for Select`
- [src]
  `impl<T: Send> Send for Receiver<T>`
- [src]
  `impl<T: Send> Send for Sender<T>`
- [src]
  `impl<T: Send> Send for SyncSender<T>`
- [src]
  `impl<T: ?Sized + Send> Send for Mutex<T>`
- [src]
  `impl<'a, T: ?Sized> !Send for MutexGuard<'a, T>`
- [src]
  `impl Send for Once`
- [src]
  `impl<T: ?Sized + Send> Send for RwLock<T>`
- [src]
  `impl<'a, T: ?Sized> !Send for RwLockReadGuard<'a, T>`
- [src]
  `impl<'a, T: ?Sized> !Send for RwLockWriteGuard<'a, T>`

# Help

## Keyboard Shortcuts

?
  Show this help dialog
S
  Focus the search field
↑
  Move up in search results
↓
  Move down in search results
↹
  Switch tab
⏎
  Go to active search result
+ / -
  Collapse/expand all sections

## Search Tricks

Prefix searches with a type followed by a colon (e.g. `fn:`) to restrict the search to a given type.

Accepted types are: `fn`, `mod`, `struct`, `enum`, `trait`, `type`, `macro`, and `const`.

Search functions by type signature (e.g. `vec -> usize` or `* -> vec`)