Skip to main content

Module function

Module function 

Source
Expand description

Function, a callable shared with C++ and Python, and the global function registry.

Structs§

Function
A type-erased callable that works across languages.
FunctionObj
The object behind a Function.

Traits§

AsPackedCallable
A closure Fn(T0, ..., Tn) -> Result<O> with 0 to 8 parameters, which Function::from_typed and Function::register_global_typed wrap. Each parameter is any AnyCompatible type, a TensorView, valid during the call, or an RValueRef<T>; O converts into Any.
PackedCallArg
One argument of a packed call: held for the call, then viewed as an FFI value. &str and &[u8] are held as String and Bytes. Implemented by #[derive(ObjectRef)] and impl_any_compatible_conversions!.
PackedCallArgs
The arguments of a packed call: a tuple of 0 to 8 PackedCallArg values.