pub trait FFIConversionFrom<T> {
// Required method
unsafe fn ffi_from_const(ffi: *const Self) -> T;
// Provided methods
unsafe fn ffi_from(ffi: *mut Self) -> T { ... }
unsafe fn ffi_from_opt(ffi: *mut Self) -> Option<T> { ... }
}Expand description
We pass here main context of parent program
Required Methods§
Sourceunsafe fn ffi_from_const(ffi: *const Self) -> T
unsafe fn ffi_from_const(ffi: *const Self) -> T
§Safety
Provided Methods§
Sourceunsafe fn ffi_from_opt(ffi: *mut Self) -> Option<T>
unsafe fn ffi_from_opt(ffi: *mut Self) -> Option<T>
§Safety
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.