tvm_ffi::extra::dispatch

Trait Dispatcher

Source
pub trait Dispatcher<Args, Ret> {
    // Required method
    fn dispatch_tuple(self, args: Args) -> Ret;
}
Expand description

Runtime type dispatch with a complete handler outcome.

Implementations generated by #[dispatch(prefix)] use a borrowed receiver (&T or &mut T) as Self and use Ret = Option<R>. Only the outer None denotes no match: a matched error or inner None remains Some(result) and does not try another handler. Consuming the receiver reference preserves results borrowing it while ordinary method calls automatically borrow it. The argument tuple and complete return type select an implementation.

Required Methods§

Source

fn dispatch_tuple(self, args: Args) -> Ret

Implementations on Foreign Types§

Source§

impl<'receiver, 'inner, 'value, D, Ret> Dispatcher<(AnyView<'value>, DefRegionKind), Ret> for &'receiver mut &'inner mut D

Source§

fn dispatch_tuple(self, args: (AnyView<'value>, DefRegionKind)) -> Ret

Implementors§