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: ?Sized + Send> Send for ThinBox<T>

impl Send for Drain<'_>

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

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

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

impl Send for CondVar

impl<T: ?Sized + Send, L: Lock + ?Sized> Send for LockedBy<T, L>

impl<T: ?Sized + Send> Send for Mutex<T>

impl<T: ?Sized + Send> Send for NoWaitLock<T>

impl<T: ?Sized + Send> Send for RwSemaphore<T>

impl<L: Lock + Send> Send for SeqLock<L>where
    L::Inner: Send,

impl<T: ?Sized + Send> Send for Mutex<T>

impl<T: ?Sized + Send> Send for SpinLock<T>

impl<T: ?Sized + Send> Send for RawSpinLock<T>

impl Send for Clk

impl Send for Device

impl<T: Chip> Send for Registration<T>

impl<T: ChipWithIrqChip> Send for RegistrationWithIrqChip<T>where
    T::Data: Send,

impl<T: Operations> Send for Registration<T>

impl Send for Executor

impl<T: Operations> Send for Registration<T>where
    T::OpenData: Send,

impl Send for TcpListener

impl Send for TcpStream

impl<T: Send> Send for Revocable<T>

impl<T: Send> Send for AsyncRevocable<T>

impl<A: Adapter + ?Sized> Send for List<A>where
    A::EntryType: Send,

impl<T: ?Sized> Send for Links<T>

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 Send for String

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

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

impl Send for Error

impl Send for CStr

impl Send for CString

impl<'a, T> !Send for ArcBorrow<'a, T>

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

impl<T: ?Sized> Send for StaticArc<T>where
    T: Send,

impl<'a, L: ?Sized, I> Send for Guard<'a, L, I>where
    L: Sync,
    <L as Lock<I>>::GuardContext: Send,

impl Send for ReadLock

impl Send for WriteLock

impl<'a, T: ?Sized> Send for NoWaitLockGuard<'a, T>where
    T: Send,

impl !Send for Guard

impl<F, T> Send for Revocable<F, T>where
    <F as LockFactory>::LockedType<Inner<T>>: Send,

impl<'a, F, T, I> Send for RevocableGuard<'a, F, T, I>where
    <<F as LockFactory>::LockedType<Inner<T>> as Lock<I>>::GuardContext: Send,
    <F as LockFactory>::LockedType<Inner<T>>: Sync,

impl<'a, L> Send for SeqLockReadGuard<'a, L>where
    L: Sync,
    <L as Lock<WriteLock>>::Inner: Sync,

impl !Send for LockClassKey

impl Send for Mode

impl<T, F> Send for ScopeGuard<T, F>where
    F: Send,
    T: Send,

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

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

impl Send for True

impl Send for False

impl<T> !Send for ARef<T>

impl<L, R> Send for Either<L, R>where
    L: Send,
    R: Send,

impl<const N: usize> !Send for Registration<N>

impl Send for EnabledClk

impl !Send for Credential

impl<T, U, V> Send for Data<T, U, V>where
    T: Send,
    U: Send,
    V: Send,

impl<T> Send for Registration<T>where
    <T as DriverOps>::RegType: Send,

impl<T, U, const N: usize> Send for IdArray<T, U, N>where
    U: Send,
    <T as RawDeviceId>::RawType: Send,

impl<'a, T, U> Send for IdTable<'a, T, U>where
    U: Sync,
    <T as RawDeviceId>::RawType: Sync,

impl<T> Send for Module<T>where
    <T as DriverOps>::RegType: Send,

impl !Send for File

impl !Send for PollTable

impl Send for SeekFrom

impl !Send for IoctlCommand

impl<'a> !Send for Value<'a>

impl !Send for Spec

impl<const N: usize, S> !Send for SpecArray<N, S>

impl<'a, S> !Send for SpecTable<'a, S>

impl<const N: usize> !Send for ConstantArray<N>

impl<'a> !Send for ConstantTable<'a>

impl Send for Super

impl Send for NeedsInit

impl Send for NeedsRoot

impl Send for SuperParams

impl<'a, T, S = NeedsInit> !Send for NewSuperBlock<'a, T, S>

impl<T> !Send for SuperBlock<T>

impl !Send for INode

impl !Send for DEntry

impl !Send for Filename

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

impl !Send for IrqData

impl Send for ExtraResult

impl Send for Type

impl !Send for Descriptor

impl<H> !Send for Registration<H>

impl<H> !Send for ThreadedRegistration<H>

impl Send for Return

impl<'a> !Send for ChainedGuard<'a>

impl !Send for Domain

impl<T: ?Sized> Send for AutoStopHandle<T>

impl Send for TcpListener

impl Send for TcpStream

impl<'a> !Send for Options<'a>

impl<T> Send for Module<T>

impl !Send for Area

impl Send for Hook

impl Send for Hook

impl Send for Hook

impl Send for Disposition

impl Send for Family

impl<T> !Send for Registration<T>

impl !Send for Device

impl !Send for Namespace

impl !Send for SkBuff

impl Send for Ipv4Addr

impl Send for Ipv6Addr

impl Send for SocketAddr

impl<const ORDER: u32> !Send for Pages<ORDER>

impl<'a, T> !Send for RevocableGuard<'a, T>

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

impl !Send for Task

impl<'a> !Send for TaskRef<'a>

impl Send for Queue

impl !Send for Work

impl !Send for BoxedQueue

impl<'a, G> !Send for Cursor<'a, G>

impl<T> !Send for Links<T>

impl<G> !Send for List<G>

impl<'a, G> !Send for CursorMut<'a, G>

impl<K, V> !Send for RBTree<K, V>

impl<'a, K, V> !Send for RBTreeIterator<'a, K, V>

impl<'a, K, V> !Send for RBTreeIteratorMut<'a, K, V>

impl<K, V> !Send for RBTreeNodeReservation<K, V>

impl<K, V> !Send for RBTreeNode<K, V>

impl<'a, A> !Send for Iterator<'a, A>

impl<'a, A> !Send for Cursor<'a, A>

impl<T> !Send for Sysctl<T>

impl Send for Resource

impl<const SIZE: usize> Send for IoMem<SIZE>

impl !Send for IovIter

impl Send for DeviceId

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

impl !Send for Device

impl !Send for UserSlicePtr

impl !Send for ThisModule

impl<'a> Send for KParamGuard<'a>

This documentation is an old archive. Please see https://rust.docs.kernel.org instead.