Trait objc2::mutability::IsAllowedMutable

source ·
pub unsafe trait IsAllowedMutable: Sealed { }
Expand description

Marker trait for classes that may feasibly be used behind a mutable reference.

This trait exist mostly to disallow using &mut self when declaring classes, since that would be a huge footgun.

This is implemented for classes whose ClassType::Mutability is one of:

§Safety

This is a sealed trait, and should not need to be implemented. Open an issue if you know a use-case where this restrition should be lifted!

Implementors§