pub trait WithOutput<T>: FnPtr + WithOutputImpl<Self> {
type F: FnPtr<Args = Self::Args, Output = T, Safety = Self::Safety, Abi = Self::Abi>;
}Expand description
Helper trait to change the return type of a function pointer type while preserving its safety, abi and arguments.
This is used by with_output! under the hood.
§Example
type F = extern "C" fn(i32) -> i32;
type G = <F as WithOutput<u32>>::F;
// `G` is `extern "C" fn(i32) -> u32`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.