MCPcopy Create free account
hub / github.com/PyO3/pyo3 / build_py_function

Function build_py_function

pyo3-macros-backend/src/pyfunction.rs:329–335  ·  view source on GitHub ↗
(
    ast: &mut syn::ItemFn,
    mut options: PyFunctionOptions,
)

Source from the content-addressed store, hash-verified

327}
328
329pub fn build_py_function(
330 ast: &mut syn::ItemFn,
331 mut options: PyFunctionOptions,
332) -> syn::Result<TokenStream> {
333 options.add_attributes(take_pyo3_options(&mut ast.attrs)?)?;
334 impl_wrap_pyfunction(ast, options)
335}
336
337/// Generates python wrapper over a function that allows adding it to a python module as a python
338/// function

Callers 1

pyfunctionFunction · 0.85

Calls 3

take_pyo3_optionsFunction · 0.85
impl_wrap_pyfunctionFunction · 0.85
add_attributesMethod · 0.45

Tested by

no test coverage detected