Trait pyo3::impl_::extract_argument::VarargsHandler

source ·
pub trait VarargsHandler<'py> {
    type Varargs;

    // Required methods
    fn handle_varargs_fastcall(
        py: Python<'py>,
        varargs: &[Option<Borrowed<'py, 'py, PyAny>>],
        function_description: &FunctionDescription
    ) -> PyResult<Self::Varargs>;
    fn handle_varargs_tuple(
        args: &Bound<'py, PyTuple>,
        function_description: &FunctionDescription
    ) -> PyResult<Self::Varargs>;
}
Expand description

A trait used to control whether to accept varargs in FunctionDescription::extract_argument_(method) functions.

Required Associated Types§

Required Methods§

source

fn handle_varargs_fastcall( py: Python<'py>, varargs: &[Option<Borrowed<'py, 'py, PyAny>>], function_description: &FunctionDescription ) -> PyResult<Self::Varargs>

Called by FunctionDescription::extract_arguments_fastcall with any additional arguments.

source

fn handle_varargs_tuple( args: &Bound<'py, PyTuple>, function_description: &FunctionDescription ) -> PyResult<Self::Varargs>

Called by FunctionDescription::extract_arguments_tuple_dict with the original tuple.

Additional arguments are those in the tuple slice starting from function_description.positional_parameter_names.len().

Object Safety§

This trait is not object safe.

Implementors§

⚠️ Internal Docs ⚠️ Not Public API 👉 Official Docs Here