MCPcopy Index your code
hub / github.com/RustPython/RustPython / static_func

Function static_func

crates/vm/src/function/builtin.rs:75–77  ·  view source on GitHub ↗
(f: F)

Source from the content-addressed store, hash-verified

73/// this function with a non-zero-sized function, it will raise a compile error.
74#[inline(always)]
75pub const fn static_func<Kind, F: IntoPyNativeFn<Kind>>(f: F) -> &'static dyn PyNativeFn {
76 zst_ref_out_of_thin_air(into_func(f))
77}
78
79#[inline(always)]
80pub const fn static_raw_func<F: PyNativeFn>(f: F) -> &'static dyn PyNativeFn {

Callers 1

new_constMethod · 0.85

Calls 2

zst_ref_out_of_thin_airFunction · 0.85
into_funcFunction · 0.85

Tested by

no test coverage detected