Trait FFIConversionFrom

Source
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§

Source

unsafe fn ffi_from_const(ffi: *const Self) -> T

§Safety

Provided Methods§

Source

unsafe fn ffi_from(ffi: *mut Self) -> T

§Safety
Source

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.

Implementations on Foreign Types§

Source§

impl FFIConversionFrom<&str> for c_char

Source§

unsafe fn ffi_from_const(ffi: *const Self) -> &'static str

Source§

unsafe fn ffi_from(ffi: *mut Self) -> &'static str

Source§

impl FFIConversionFrom<i128> for [u8; 16]

Source§

unsafe fn ffi_from_const(ffi: *const Self) -> i128

Source§

impl FFIConversionFrom<u128> for [u8; 16]

Source§

unsafe fn ffi_from_const(ffi: *const Self) -> u128

Source§

impl FFIConversionFrom<String> for c_char

Source§

unsafe fn ffi_from_const(ffi: *const Self) -> String

Source§

unsafe fn ffi_from(ffi: *mut Self) -> String

Implementors§

Source§

impl FFIConversionFrom<&[u8]> for ByteArray

Source§

impl<T, FFI> FFIConversionFrom<Box<T>> for FFI
where FFI: FFIConversionFrom<T>,