pub const fn static_func<Kind, F: IntoPyNativeFn<Kind>>(
f: F,
) -> &'static dyn PyNativeFn
Expand description
Get the STATIC_FUNC
of the passed function. The same
requirements of zero-sizedness apply, see that documentation for details.
Equivalent to IntoPyNativeFn::into_func()
, but usable in a const context. This is only
valid if the function is zero-sized, i.e. that std::mem::size_of::<F>() == 0
. If you call
this function with a non-zero-sized function, it will raise a compile error.