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

Function init

tests/ui/invalid_pymodule_init_pyfunction.rs:10–12  ·  view source on GitHub ↗

~^ ERROR: `#[pyfunction]` cannot be used alongside `#[pymodule_init]`

(_m: &Bound<'_, PyModule>)

Source from the content-addressed store, hash-verified

8 #[pyfunction]
9//~^ ERROR: `#[pyfunction]` cannot be used alongside `#[pymodule_init]`
10 fn init(_m: &Bound<'_, PyModule>) -> PyResult<()> {
11 Ok(())
12 }
13}
14
15fn main() {}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected