pub unsafe trait BlockFn: Sealed<Self::Args, Self::Output> {
type Args: EncodeArguments;
type Output: EncodeReturn;
}Expand description
Types that represent closure parameters/arguments and return types in a block.
This is implemented for dyn Fn closures with up to 12 parameters,
where each parameter implements EncodeArgument and the return type
implements EncodeReturn.
§Safety
This is a sealed trait, and should not need to be implemented. Open an issue if you know a use-case where this restrition should be lifted!
Required Associated Types§
Sourcetype Args: EncodeArguments
type Args: EncodeArguments
The parameters/arguments to the block.
Sourcetype Output: EncodeReturn
type Output: EncodeReturn
The return type of the block.
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.