pub trait MethodDef<T> {
const METH: T;
}Expand description
A workaround for Rust not allowing function pointers as const generics: define a trait which has a constant function pointer.
Required Associated Constants§
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.
Implementors§
Source§impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature experimental-async only.
impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature
experimental-async only.Source§impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature experimental-async only.
impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature
experimental-async only.Source§impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject, *const *mut PyObject, isize, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature experimental-async only.
impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject, *const *mut PyObject, isize, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature
experimental-async only.Source§impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject, *const *mut PyObject, isize, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature experimental-async only.
impl MethodDef<for<'py> unsafe fn(Python<'py>, *mut PyObject, *const *mut PyObject, isize, *mut PyObject) -> Result<*mut PyObject, PyErr>> for Def
Available on crate feature
experimental-async only.