pub trait WithArgs<Args: Tuple>: FnPtr {
type F: FnPtr<Args = Args, Output = Self::Output, Safety = Self::Safety, Abi = Self::Abi>;
}Expand description
Helper trait to change the argument types of a function pointer type while preserving its safety, abi and return type.
This is used by with_args! under the hood.
§Example
type F = extern "C" fn(i32) -> i32;
type G = <F as WithArgs<(u8, u16)>>::F;
// `G` `extern "C" fn(u8, u16) -> i32`Required Associated Types§
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.