Trait tvm_rt::function::ToFunction [−][src]
pub trait ToFunction<I, O>: Sized {
type Handle;
fn into_raw(self) -> *mut Self::Handle;
fn call<'a>(
handle: *mut Self::Handle,
args: Vec<ArgValue<'a>>
) -> Result<RetValue>
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 c_int,
num_args: c_int,
ret: TVMRetValueHandle,
resource_handle: *mut c_void
) -> c_int
where
Self: Typed<I, O>,
{ ... }
unsafe extern "C" fn tvm_finalizer(fhandle: *mut c_void) { ... }
}
Associated Types
Required methods
Provided methods
fn to_function(self) -> Function where
Self: Typed<I, O>,
The callback function which is wrapped converted by TVM into a packed function stored in fhandle.
unsafe extern "C" fn tvm_finalizer(fhandle: *mut c_void)
unsafe extern "C" fn tvm_finalizer(fhandle: *mut c_void)
The finalizer which is invoked when the packed function’s reference count is zero.