pub trait FFIConversion<T> {
// Required methods
unsafe fn ffi_from_const(ffi: *const Self) -> T;
unsafe fn ffi_to_const(obj: T) -> *const Self;
// Provided methods
unsafe fn ffi_from(ffi: *mut Self) -> T { ... }
unsafe fn ffi_to(obj: T) -> *mut Self { ... }
unsafe fn ffi_from_opt(ffi: *mut Self) -> Option<T> { ... }
unsafe fn ffi_to_opt(obj: Option<T>) -> *mut Self
where Self: Sized { ... }
unsafe fn destroy(ffi: *mut Self) { ... }
}Required Methods§
Sourceunsafe fn ffi_from_const(ffi: *const Self) -> T
unsafe fn ffi_from_const(ffi: *const Self) -> T
§Safety
Sourceunsafe fn ffi_to_const(obj: T) -> *const Self
unsafe fn ffi_to_const(obj: T) -> *const Self
§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.