pub unsafe trait AnyThread: SealedAnyThread {
// Provided method
fn alloc() -> Allocated<Self>
where Self: Sized + ClassType { ... }
}Expand description
Marker trait for classes (and protocols) that are usable from any thread,
i.e. the opposite of MainThreadOnly.
This is mostly an implementation detail to expose the alloc method
with different signatures depending on whether a class is main thread only
or not. You can safely assume that things are safe to use from any thread,
unless they implement MainThreadOnly, not only if they implement
this trait.
§Safety
This is a sealed trait, and should not need to be implemented; it is
implemented automatically when you implement ClassType.