Trait scale_info::prelude::marker::Send 1.0.0[−][src]
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.
Implementations on Foreign Types
impl Send for Argument
impl Send for FormatSpec
impl Send for Alignment
impl Send for Count
NonNull
pointers are not Send
because the data they reference may be aliased.
Conditionally mark BitSlice
as Send
based on its T
type argument.
In order for BitSlice
to be Send
(that is, &mut BitSlice
can be moved
across thread boundaries), it must be capable of writing to memory without
invalidating any other &BitSlice
handles that alias the same memory address.
This is true when T
is one of the fundamental integers, because no other
&BitSlice
handle is able to observe mutations, or when T
is a BitSafe
type
that implements atomic read-modify-write instructions, because other &BitSlice
types will be protected from data races by the hardware.
When T
is a non-atomic BitSafe
type, BitSlice
cannot be Send
, because
one &mut BitSlice
moved across a thread boundary may cause mutation that
another &BitSlice
may observe, but the instructions used to access memory do
not guard against data races.
A &mut BitSlice
over aliased memory addresses is equivalent to either a
&Cell
or &AtomicT
, depending on what the radium
crate makes available
for the register width.
Implementors
impl<'_, T> Send for scale_info::prelude::collections::vec_deque::Drain<'_, T> where
T: Send,
Auto implementors
impl Send for NamedFields
impl Send for UnnamedFields
impl Send for NameAssigned
impl Send for NameNotAssigned
impl Send for TypeAssigned
impl Send for TypeNotAssigned
impl Send for PathAssigned
impl Send for PathNotAssigned
impl Send for TypeDefPrimitive
impl Send for PortableForm
impl Send for TryReserveError
impl Send for FpCategory
impl Send for IntErrorKind
impl Send for VariantBuilder
impl Send for PortableRegistry
impl Send for TypeDefPhantom
impl Send for DefaultHasher
impl Send for RandomState
impl Send for NonZeroI16
impl Send for NonZeroI32
impl Send for NonZeroI64
impl Send for NonZeroI128
impl Send for NonZeroIsize
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 FromUtf8Error
impl Send for FromUtf16Error
impl Send for PhantomPinned
impl<'a, 'b> !Send for DebugStruct<'a, 'b>
impl<'a, 'b> !Send for DebugTuple<'a, 'b>
impl<'a, K, F> Send for scale_info::prelude::collections::hash_set::DrainFilter<'a, K, F> where
F: Send,
K: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::Entry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::Entry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::Iter<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::IterMut<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::Keys<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::OccupiedEntry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::OccupiedError<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::Range<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::VacantEntry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::Values<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::btree_map::ValuesMut<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::Drain<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::Iter<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::IterMut<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::Keys<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::OccupiedEntry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::OccupiedError<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::VacantEntry<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::Values<'a, K, V> where
K: Sync,
V: Sync,
impl<'a, K, V> Send for scale_info::prelude::collections::hash_map::ValuesMut<'a, K, V> where
K: Send,
V: Send,
impl<'a, K, V, F> Send for scale_info::prelude::collections::btree_map::DrainFilter<'a, K, V, F> where
F: Send,
K: Send,
V: Send,
impl<'a, K, V, F> Send for scale_info::prelude::collections::hash_map::DrainFilter<'a, K, V, F> where
F: Send,
K: Send,
V: Send,
impl<'a, K, V, S> Send for RawEntryMut<'a, K, V, S> where
K: Send,
S: Sync,
V: Send,
impl<'a, K, V, S> Send for RawEntryBuilder<'a, K, V, S> where
K: Sync,
S: Sync,
V: Sync,
impl<'a, K, V, S> Send for RawEntryBuilderMut<'a, K, V, S> where
K: Send,
S: Send,
V: Send,
impl<'a, K, V, S> Send for RawOccupiedEntryMut<'a, K, V, S> where
K: Send,
V: Send,
impl<'a, K, V, S> Send for RawVacantEntryMut<'a, K, V, S> where
K: Send,
S: Sync,
V: Send,
impl<'a, T> Send for DrainSorted<'a, T> where
T: Send,
impl<'a, T> Send for scale_info::prelude::collections::btree_set::Difference<'a, T> where
T: Sync,
impl<'a, T> Send for scale_info::prelude::collections::btree_set::Intersection<'a, T> where
T: Sync,
impl<'a, T> Send for scale_info::prelude::collections::btree_set::SymmetricDifference<'a, T> where
T: Sync,
impl<'a, T, F> !Send for scale_info::prelude::collections::linked_list::DrainFilter<'a, T, F>
impl<'a, T, F> Send for scale_info::prelude::collections::btree_set::DrainFilter<'a, T, F> where
F: Send,
T: Send,
impl<'a, T, F, A> Send for scale_info::prelude::vec::DrainFilter<'a, T, F, A> where
A: Send,
F: Send,
T: Send,
impl<'a, T, S> Send for scale_info::prelude::collections::hash_set::Difference<'a, T, S> where
S: Sync,
T: Sync,
impl<'a, T, S> Send for scale_info::prelude::collections::hash_set::Intersection<'a, T, S> where
S: Sync,
T: Sync,
impl<'a, T, S> Send for scale_info::prelude::collections::hash_set::SymmetricDifference<'a, T, S> where
S: Sync,
T: Sync,
impl<'a, T, S> Send for scale_info::prelude::collections::hash_set::Union<'a, T, S> where
S: Sync,
T: Sync,
impl<H> Send for BuildHasherDefault<H> where
H: Send,
impl<K, V> Send for scale_info::prelude::collections::btree_map::IntoIter<K, V> where
K: Send,
V: Send,
impl<K, V> Send for scale_info::prelude::collections::btree_map::IntoKeys<K, V> where
K: Send,
V: Send,
impl<K, V> Send for scale_info::prelude::collections::btree_map::IntoValues<K, V> where
K: Send,
V: Send,
impl<K, V> Send for scale_info::prelude::collections::hash_map::IntoIter<K, V> where
K: Send,
V: Send,
impl<K, V> Send for scale_info::prelude::collections::hash_map::IntoKeys<K, V> where
K: Send,
V: Send,
impl<K, V> Send for scale_info::prelude::collections::hash_map::IntoValues<K, V> where
K: Send,
V: Send,
impl<N, T> Send for FieldBuilder<N, T>
impl<S> Send for TypeBuilder<S>
impl<T> Send for FieldsBuilder<T>
impl<T> Send for UntrackedSymbol<T>
impl<T> Send for TypeDefArray<T> where
<T as Form>::Type: Send,
impl<T> Send for TypeDefBitSequence<T> where
<T as Form>::Type: Send,
impl<T> Send for TypeDefCompact<T> where
<T as Form>::Type: Send,
impl<T> Send for TypeDefSequence<T> where
<T as Form>::Type: Send,
impl<T> Send for TypeDefTuple<T> where
<T as Form>::Type: Send,
impl<T> Send for IntoIterSorted<T> where
T: Send,
impl<T> Send for BinaryHeap<T> where
T: Send,
impl<T> Send for Discriminant<T>
impl<T> Send for MaybeUninit<T> where
T: Send,
impl<T: ?Sized> Send for ManuallyDrop<T> where
T: Send,
impl<T: ?Sized> Send for PhantomData<T> where
T: Send,