pub unsafe trait Encode {
// Required method
fn encode() -> Encoding;
}
Expand description
Types that have an Objective-C type encoding.
Unsafe because Objective-C will make assumptions about the type (like its size and alignment) from its encoding, so the implementer must verify that the encoding is accurate.
Required Methods§
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.