Trait tvm::function::ToFunction[][src]

pub trait ToFunction<I, O> {
    type Handle;
    fn into_raw(self) -> *mut Self::Handle;
fn call(
        handle: *mut Self::Handle,
        args: Vec<ArgValue<'a>, Global>
    ) -> Result<RetValue, Error>
    where
        Self: Typed<I, O>
;
fn drop(handle: *mut Self::Handle); fn to_function(self) -> Function
    where
        Self: Typed<I, O>
, { ... }
unsafe extern "C" fn tvm_callback(
        args: *mut TVMValue,
        type_codes: *mut i32,
        num_args: i32,
        ret: *mut c_void,
        resource_handle: *mut c_void
    ) -> i32
    where
        Self: Typed<I, O>
, { ... }
unsafe extern "C" fn tvm_finalizer(fhandle: *mut c_void) { ... } }

Associated Types

Required methods

Provided methods

The callback function which is wrapped converted by TVM into a packed function stored in fhandle.

The finalizer which is invoked when the packed function’s reference count is zero.

Implementations on Foreign Types

Implementors