pub trait AsPackedCallable<I, O> {
// Required method
fn call_packed(&self, packed_args: &[AnyView<'_>]) -> Result<Any>;
// Provided method
fn type_schema() -> String
where Self: Sized { ... }
}Expand description
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.
Required Methods§
Sourcefn call_packed(&self, packed_args: &[AnyView<'_>]) -> Result<Any>
fn call_packed(&self, packed_args: &[AnyView<'_>]) -> Result<Any>
Call the function with packed arguments.
Provided Methods§
Sourcefn type_schema() -> Stringwhere
Self: Sized,
fn type_schema() -> Stringwhere
Self: Sized,
The type schema of the function, a JSON description of its signature.
A typed function lists its return and parameter types. The default, for a callable whose signature is not known, is the schema of an untyped function.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".