We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fbdbf4 commit aa13544Copy full SHA for aa13544
crates/objc2/src/mutability.rs
@@ -315,6 +315,10 @@ impl<T: ?Sized + ClassType> IsMutable for T where T::Mutability: private::Mutabi
315
///
316
/// This is implemented for classes whose [`ClassType::Mutability`] is one of:
317
/// - [`MainThreadOnly`].
318
+///
319
+/// Since `MainThreadOnly` types must be `!Send` and `!Sync`, if you hold a
320
+/// type that implements this trait, then you're guaranteed to be on the main
321
+/// thread.
322
//
323
// Note: MainThreadMarker::from relies on this.
324
pub trait IsMainThreadOnly: ClassType {}
0 commit comments