Skip to main content

Send

Trait 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 and the Sync trait for more details.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

1.26.0 · Source§

impl !Send for Args

1.26.0 · Source§

impl !Send for ArgsOs

1.0.0 · Source§

impl !Send for Arguments<'_>

Source§

impl !Send for LocalWaker

1.98.0 · Source§

impl !Send for VarsOs

Source§

impl Send for Bytes<'_>

Source§

impl Send for surfman::wayland::connection::Connection

Source§

impl Send for surfman::x11::connection::Connection

Source§

impl Send for DIR

1.6.0 · Source§

impl Send for alloc::string::Drain<'_>

Source§

impl Send for EGLBackedSurface

Source§

impl Send for EGLLibraryWrapper

Source§

impl Send for Egl

Source§

impl Send for Glx

Source§

impl Send for libloading::os::unix::Library

Source§

impl Send for libloading::safe::Library

1.10.0 · Source§

impl Send for Location<'_>

Source§

impl Send for surfman::mesa_surfaceless::connection::NativeConnectionWrapper

Source§

impl Send for surfman::mesa_surfaceless::surface::Surface

Source§

impl Send for surfman::wayland::surface::Surface

Source§

impl Send for surfman::x11::surface::Surface

1.0.0 · Source§

impl Send for TypeId

1.36.0 · Source§

impl Send for Waker

Source§

impl Send for XInput

Source§

impl Send for XInput2

Source§

impl Send for Xcursor

Source§

impl Send for x11_dl::dpms::Xext

Source§

impl Send for x11_dl::sync::Xext

Source§

impl Send for x11_dl::xshm::Xext

Source§

impl Send for x11_dl::xf86vmode::Xf86vmode

Source§

impl Send for x11_dl::xrecord::Xf86vmode

Source§

impl Send for x11_dl::xtest::Xf86vmode

Source§

impl Send for Xft

Source§

impl Send for x11_dl::xlib::Xlib

Source§

impl Send for x11_dl::xfixes::Xlib

Source§

impl Send for x11_dl::xinerama::Xlib

Source§

impl Send for Xlib_xcb

Source§

impl Send for Xmu

Source§

impl Send for Xpresent

Source§

impl Send for Xrandr

Source§

impl Send for Xrandr_2_2_0

Source§

impl Send for Xrender

Source§

impl Send for Xss

Source§

impl Send for Xt

Source§

impl Send for wl_interface

1.44.0 · Source§

impl<'a> Send for IoSlice<'a>

1.44.0 · Source§

impl<'a> Send for IoSliceMut<'a>

Source§

impl<Dyn> Send for DynMetadata<Dyn>
where Dyn: ?Sized,

1.0.0 · Source§

impl<T, A> !Send for Rc<T, A>
where A: Allocator, T: ?Sized,

Source§

impl<T, A> !Send for UniqueRc<T, A>
where A: Allocator, T: ?Sized,

1.4.0 · Source§

impl<T, A> !Send for alloc::rc::Weak<T, A>
where A: Allocator, T: ?Sized,

1.0.0 · Source§

impl<T, A> Send for Arc<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

Source§

impl<T, A> Send for Cursor<'_, T, A>
where T: Sync, A: Allocator + Sync,

Source§

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

1.6.0 · Source§

impl<T, A> Send for alloc::collections::vec_deque::drain::Drain<'_, T, A>
where T: Send, A: Allocator + Send,

1.6.0 · Source§

impl<T, A> Send for alloc::vec::drain::Drain<'_, T, A>
where T: Send, A: Send + Allocator,

1.0.0 · Source§

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

1.0.0 · Source§

impl<T, A> Send for LinkedList<T, A>
where T: Send, A: Allocator + Send,

Source§

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

1.4.0 · Source§

impl<T, A> Send for alloc::sync::Weak<T, A>
where T: Sync + Send + ?Sized, A: Allocator + Send,

1.0.0 · Source§

impl<T> !Send for *const T
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for *mut T
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::mutex::MappedMutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::poison::mutex::MappedMutexGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::rwlock::MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::poison::rwlock::MappedRwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::rwlock::MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::poison::rwlock::MappedRwLockWriteGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::mutex::MutexGuard<'_, T>
where T: ?Sized,

A MutexGuard is not Send to maximize platform portability.

On platforms that use POSIX threads (commonly referred to as pthreads) there is a requirement to release mutex locks on the same thread they were acquired. For this reason, MutexGuard must not implement Send to prevent it being dropped from another thread.

1.0.0 · Source§

impl<T> !Send for std::sync::poison::mutex::MutexGuard<'_, T>
where T: ?Sized,

A MutexGuard is not Send to maximize platform portability.

On platforms that use POSIX threads (commonly referred to as pthreads) there is a requirement to release mutex locks on the same thread they were acquired. For this reason, MutexGuard must not implement Send to prevent it being dropped from another thread.

1.25.0 · Source§

impl<T> !Send for NonNull<T>
where T: ?Sized,

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

Source§

impl<T> !Send for ReentrantLockGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::rwlock::RwLockReadGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for std::sync::poison::rwlock::RwLockReadGuard<'_, T>
where T: ?Sized,

Source§

impl<T> !Send for std::sync::nonpoison::rwlock::RwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

impl<T> !Send for std::sync::poison::rwlock::RwLockWriteGuard<'_, T>
where T: ?Sized,

1.0.0 · Source§

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

1.0.0 · Source§

impl<T> Send for Atomic<T>
where T: AtomicPrimitive,

1.0.0 · Source§

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

1.31.0 · Source§

impl<T> Send for ChunksExactMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for ChunksMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for core::slice::iter::Iter<'_, T>
where T: Sync,

1.0.0 · Source§

impl<T> Send for alloc::collections::linked_list::Iter<'_, T>
where T: Sync,

1.0.0 · Source§

impl<T> Send for core::slice::iter::IterMut<'_, T>
where T: Send,

1.0.0 · Source§

impl<T> Send for alloc::collections::linked_list::IterMut<'_, T>
where T: Send,

1.29.0 · Source§

impl<T> Send for JoinHandle<T>

Source§

impl<T> Send for std::sync::nonpoison::mutex::Mutex<T>
where T: Send + ?Sized,

T must be Send for a Mutex to be Send because it is possible to acquire the owned T from the Mutex via into_inner.

1.0.0 · Source§

impl<T> Send for std::sync::poison::mutex::Mutex<T>
where T: Send + ?Sized,

T must be Send for a Mutex to be Send because it is possible to acquire the owned T from the Mutex via into_inner.

1.28.0 · Source§

impl<T> Send for NonZero<T>

1.70.0 · Source§

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

1.31.0 · Source§

impl<T> Send for RChunksExactMut<'_, T>
where T: Send,

1.31.0 · Source§

impl<T> Send for RChunksMut<'_, T>
where T: Send,

Source§

impl<T> Send for std::sync::mpmc::Receiver<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for std::sync::mpsc::Receiver<T>
where T: Send,

Source§

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

1.0.0 · Source§

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

Source§

impl<T> Send for std::sync::nonpoison::rwlock::RwLock<T>
where T: Send + ?Sized,

1.0.0 · Source§

impl<T> Send for std::sync::poison::rwlock::RwLock<T>
where T: Send + ?Sized,

Source§

impl<T> Send for std::sync::mpmc::Sender<T>
where T: Send,

1.0.0 · Source§

impl<T> Send for std::sync::mpsc::Sender<T>
where T: Send,

Source§

impl<T> Send for libloading::safe::Symbol<'_, T>
where T: Send,

Source§

impl<T> Send for libloading::os::unix::Symbol<T>
where T: Send,

1.0.0 · Source§

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

Source§

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

ThinBox<T> is Send if T is Send because the data is owned.

Auto implementors§

§

impl !Send for surfman::mesa_surfaceless::context::Context

§

impl !Send for surfman::wayland::context::Context

§

impl !Send for surfman::x11::context::Context

§

impl !Send for CurrentContextGuard

§

impl !Send for surfman::wayland::device::Device

§

impl !Send for surfman::x11::device::Device

§

impl !Send for EGLBackedContext

§

impl !Send for EGLClientPixmapHI

§

impl !Send for EGLSurfaceObjects

§

impl !Send for EGLSurfaceTexture

§

impl !Send for ExternalEGLSurfaces

§

impl !Send for surfman::egl::FnPtr

§

impl !Send for surfman::wayland::connection::NativeConnection

§

impl !Send for surfman::x11::connection::NativeConnection

§

impl !Send for surfman::wayland::connection::NativeConnectionWrapper

§

impl !Send for surfman::x11::connection::NativeConnectionWrapper

§

impl !Send for NativeContext

§

impl !Send for surfman::wayland::surface::NativeWidget

§

impl !Send for surfman::mesa_surfaceless::surface::SurfaceTexture

§

impl !Send for surfman::wayland::surface::SurfaceTexture

§

impl !Send for surfman::x11::surface::SurfaceTexture

§

impl Send for Abi

§

impl Send for surfman::mesa_surfaceless::device::Adapter

§

impl Send for Alignment

§

impl Send for Array

§

impl Send for Assume

§

impl Send for Bool

§

impl Send for Char

§

impl Send for surfman::mesa_surfaceless::connection::Connection

§

impl Send for Const

§

impl Send for ContextAttributeFlags

§

impl Send for ContextAttributes

§

impl Send for surfman::mesa_surfaceless::context::ContextDescriptor

§

impl Send for ContextID

§

impl Send for surfman::mesa_surfaceless::device::Device

§

impl Send for DynTrait

§

impl Send for DynTraitPredicate

§

impl Send for EGLClientBufferOpaque

§

impl Send for EGLExtensionFunctions

§

impl Send for EGLImageKHROpaque

§

impl Send for Enum

§

impl Send for Error

§

impl Send for Field

§

impl Send for FieldId

§

impl Send for Float

§

impl Send for surfman::egl::__gl_imports::mem::type_info::FnPtr

§

impl Send for GLApi

§

impl Send for GLVersion

§

impl Send for Generic

§

impl Send for GenericType

§

impl Send for Int

§

impl Send for Lifetime

§

impl Send for surfman::mesa_surfaceless::connection::NativeConnection

§

impl Send for surfman::mesa_surfaceless::device::NativeDevice

§

impl Send for surfman::wayland::device::NativeDevice

§

impl Send for surfman::x11::device::NativeDevice

§

impl Send for surfman::mesa_surfaceless::surface::NativeWidget

§

impl Send for surfman::x11::surface::NativeWidget

§

impl Send for Pointer

§

impl Send for Reference

§

impl Send for Renderbuffers

§

impl Send for Slice

§

impl Send for Str

§

impl Send for Struct

§

impl Send for SurfaceAccess

§

impl Send for SurfaceID

§

impl Send for SurfaceInfo

§

impl Send for SystemSurfaceInfo

§

impl Send for Trait

§

impl Send for Tuple

§

impl Send for Type

§

impl Send for TypeKind

§

impl Send for Union

§

impl Send for Variant

§

impl Send for WindowingApiError

§

impl Send for __eglMustCastToProperFunctionPointerType_fn

§

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

§

impl<'a> Send for PreserveBuffer<'a>

§

impl<'a> Send for surfman::mesa_surfaceless::surface::SurfaceDataGuard<'a>

§

impl<'a> Send for surfman::wayland::surface::SurfaceDataGuard<'a>

§

impl<'a> Send for surfman::x11::surface::SurfaceDataGuard<'a>

§

impl<Def, Alt> Send for surfman::multi::device::Adapter<Def, Alt>
where <<Def as Device>::Connection as Connection>::Adapter: Send, <<Alt as Device>::Connection as Connection>::Adapter: Send,

§

impl<Def, Alt> Send for surfman::multi::connection::Connection<Def, Alt>
where <Alt as Device>::Connection: Sized + Send, <Def as Device>::Connection: Sized + Send,

§

impl<Def, Alt> Send for surfman::multi::context::Context<Def, Alt>
where <Def as Device>::Context: Send, <Alt as Device>::Context: Send,

§

impl<Def, Alt> Send for surfman::multi::context::ContextDescriptor<Def, Alt>

§

impl<Def, Alt> Send for surfman::multi::device::Device<Def, Alt>
where Def: Send, Alt: Send,

§

impl<Def, Alt> Send for surfman::multi::surface::NativeWidget<Def, Alt>

§

impl<Def, Alt> Send for surfman::multi::surface::Surface<Def, Alt>
where <Def as Device>::Surface: Send, <Alt as Device>::Surface: Send,

§

impl<Def, Alt> Send for surfman::multi::surface::SurfaceTexture<Def, Alt>
where <Def as Device>::SurfaceTexture: Send, <Alt as Device>::SurfaceTexture: Send,

§

impl<Device> Send for BackBuffer<Device>
where <Device as Device>::Surface: Send,

§

impl<Device> Send for SwapChain<Device>
where <Device as Device>::Surface: Send,

§

impl<Device> Send for SwapChainData<Device>
where <Device as Device>::Surface: Send,

§

impl<NativeWidget> Send for SurfaceType<NativeWidget>
where NativeWidget: Send,

§

impl<P> Send for MaybeDangling<P>
where P: Send + ?Sized,

§

impl<S, E> Send for Framebuffer<S, E>
where E: Send, S: Send,

§

impl<SwapChainID, Device> Send for SwapChains<SwapChainID, Device>
where SwapChainID: Send + Sync, <Device as Device>::Surface: Send,

§

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

§

impl<T> Send for Discriminant<T>

§

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

§

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

§

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