Trait WithAbi
Source pub trait WithAbi<Abi: Abi>: FnPtr {
type F: FnPtr<Args = Self::Args, Output = Self::Output, Safety = Self::Safety, Abi = Abi>;
}
Expand description
Helper trait to change the abi of a function pointer type while preserving its safety, arguments and return type.
This is used by with_abi! under the hood.
§Example
type F = extern "C" fn(i32) -> i32;
type G = <F as WithAbi<abi::System>>::F;
The function pointer type with the requested abi (preserving all other properties).
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".