Modulesยง
- function_
argument ๐ - Seals
PyFunctionArgumentso that types outside PyO3 cannot implement it. - function_
argument_ ๐holder - Seals
FunctionArgumentHolderso that types outside PyO3 cannot implement it. - varargs_
handler ๐ - Seals
VarargsHandlerso that types outside PyO3 cannot implement it. - varkeywords_
halder ๐ - Seals
VarkeywordsHandlerso that types outside PyO3 cannot implement it.
Structsยง
- Dict
Varkeywords - Marker struct which indicates unknown keywords should be collected into a
PyDict. - Function
Description - Function argument specification for a
#[pyfunction]or#[pymethod]. - Keyword
Only Parameter Description - NoVarargs
- Marker struct which indicates varargs are not allowed.
- NoVarkeywords
- Marker struct which indicates unknown keywords are not permitted.
- Tuple
Varargs - Marker struct which indicates varargs should be collected into a
PyTuple.
Traitsยง
- Function
Argument Holder - Trait for types which can be a function argument holder - they should to be able to const-initialize to an empty value.
- PyFunction
Argument - A trait which is used to help PyO3 macros extract function arguments.
- Varargs
Handler - A trait used to control whether to accept varargs in FunctionDescription::extract_argument_(method) functions.
- Varkeywords
Handler - A trait used to control whether to accept varkeywords in FunctionDescription::extract_argument_(method) functions.
Functionsยง
- argument_
extraction_ error - Adds the argument name to the error message of an error which occurred during argument extraction.
- cast_
function_ โargument - Cast a raw
*mut ffi::PyObjectto aPyArg. This is used to access safer PyO3 APIs with the assumption that the borrowed argument is valid for the lifetime'py. - cast_
non_ โnull_ function_ argument - Cast a
NonNull<ffi::PyObject>to aPyArg. This is used to access safer PyO3 APIs with the assumption that the borrowed argument is valid for the lifetime'py. - cast_
optional_ โfunction_ argument - As above, but for optional arguments which may be NULL.
- extract_
argument - The standard implementation of how PyO3 extracts a
#[pyfunction]or#[pymethod]function argument. - extract_
argument_ with_ default - Alternative to
extract_argumentused when the argument has a default value provided by an annotation. - extract_
pyclass_ ref - extract_
pyclass_ ref_ mut - from_
py_ with - Alternative to
extract_argumentused when the argument has a#[pyo3(from_py_with)]annotation. - from_
py_ with_ with_ default - Alternative to
extract_argumentused when the argument has a#[pyo3(from_py_with)]annotation and also a default value. - push_
parameter_ ๐list - unwrap_
required_ โargument - Unwraps the Option<&PyAny> produced by the FunctionDescription
extract_arguments_methods. They check if required methods are all provided. - unwrap_
required_ โargument_ bound - Variant of above used with
from_py_withextractors on required arguments.
Type Aliasesยง
- PyArg ๐
- Helper type used to keep implementation more concise.