Trait swc_common::sync::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<'de> Send for Content<'de>
impl<'a> Send for InternallyTaggedUnitVisitor<'a>
impl Send for TagContentOtherField
impl Send for TagContentOtherFieldVisitor
impl Send for TagOrContentField
impl Send for TagOrContentFieldVisitor
impl<'a> Send for UntaggedUnitVisitor<'a>
impl Send for Argument
impl Send for FormatSpec
impl Send for Alignment
impl Send for Count
impl<'a, 'b> !Send for DebugStruct<'a, 'b>
impl<'a, 'b> !Send for DebugTuple<'a, 'b>
impl<T: ?Sized> Send for PhantomData<T> where
T: Send,
NonNull
pointers are not Send
because the data they reference may be aliased.
impl<R, G, T> Send for ReentrantMutex<R, G, T> where
T: Send + ?Sized,
R: RawMutex + Send,
G: GetThreadId + Send,
impl<'a, R, T> Send for MappedMutexGuard<'a, R, T> where
T: 'a + ?Sized,
R: 'a + RawMutex,
<R as RawMutex>::GuardMarker: Send,
impl<'a, R, T> Send for MappedRwLockWriteGuard<'a, R, T> where
T: 'a + ?Sized,
R: 'a + RawRwLock,
<R as RawRwLock>::GuardMarker: Send,
impl<'a, R, T> Send for MappedRwLockReadGuard<'a, R, T> where
T: 'a + ?Sized,
R: 'a + RawRwLock,
<R as RawRwLock>::GuardMarker: Send,
Implementors
Auto implementors
impl !Send for SingleThreadedComments
impl Send for CommentKind
impl Send for ColorConfig
impl Send for Destination
impl Send for Applicability
impl Send for DiagnosticId
impl Send for NonNarrowChar
impl Send for SpanLinesError
impl Send for SpanSnippetError
impl Send for EmitterWriter
impl Send for CodeSuggestion
impl Send for Diagnostic
impl Send for DiagnosticStyledString
impl Send for ExplicitBug
impl Send for FatalError
impl Send for FatalErrorMarker
impl Send for HandlerFlags
impl Send for SubDiagnostic
impl Send for Substitution
impl Send for SubstitutionPart
impl Send for SyntaxContext
impl Send for DefaultSourceMapGenConfig
impl Send for DistinctSources
impl Send for FilePathMapping
impl Send for LocWithOpt
impl Send for MalformedSourceMapPositions
impl Send for MultiByteChar
impl Send for RealFileLoader
impl Send for SourceFile
impl Send for SourceFileAndBytePos
impl Send for SourceFileAndLine
impl Send for StableSourceFileId
impl<'a> Send for WritableDst<'a>
impl<'a> Send for DiagnosticBuilder<'a>
impl<'a> Send for StringInput<'a>