[][src]Module rustpython_vm::function

Structs

Args

A list of positional argument values.

KwArgs

A map of keyword arguments to their values.

OwnedParam
PyFuncArgs

The PyFuncArgs struct is one of the most used structs then creating a rust function that can be called from python. It holds both positional arguments, as well as keyword arguments passed to the function.

RefParam

Enums

ArgumentError

An error encountered while binding arguments to the parameters of a Python function call.

OptionalArg

An argument that may or may not be provided by the caller.

Traits

FromArgs

Implemented by any type that can be accepted as a parameter to a built-in function.

IntoPyNativeFunc

Implemented by types that are or can generate built-in functions.

Functions

single_or_tuple_any

Tests that the predicate is True on a single value, or if the value is a tuple a tuple, then test that any of the values contained within the tuples satisfies the predicate. Type parameter T specifies the type that is expected, if the input value is not of that type or a tuple of values of that type, then a TypeError is raised.

Type Definitions

OptionalOption
PyNativeFunc

A built-in Python function.