fn dispatch(&self, req: Request) -> Call<Reply> {
        match req {
            Request::Terminate(req) => Call::new_wrap(self.terminate(req), Reply::Terminate),
            Request::OpenWasm(req) => Call::new_wrap(self.open_wasm(req), Reply::OpenWasm),
            Request::CloseWasm(req) => Call::new_wrap(self.close_wasm(req), Reply::CloseWasm),
            Request::OpenMemory(req) => Call::new_wrap(self.open_memory(req), Reply::OpenMemory),
            Request::CloseMemory(req) => Call::new_wrap(self.close_memory(req), Reply::CloseMemory),
            Request::StartExecution(req) => {
                Call::new_wrap(self.start_execution(req), Reply::StartExecution)
            }
            Request::CreateExecutionState(req) => Call::new_wrap(
                self.create_execution_state(req),
                Reply::CreateExecutionState,
            ),
        }
    }
/// Dispatch generic RPC message to target function and produce
/// matched reply (sync or async)
Dispatch generic RPC message to target function and produce
matched reply (sync or async)
Dispatch generic RPC message to target function and produce matched reply ( sync or async )
fn dispatch(&self, req: Request) -> Call<Reply> {
        match req {
            Request::Terminate(req) => Call::new_wrap(self.terminate(req), Reply::Terminate),
            Request::OpenWasm(req) => Call::new_wrap(self.open_wasm(req), Reply::OpenWasm),
            Request::CloseWasm(req) => Call::new_wrap(self.close_wasm(req), Reply::CloseWasm),
            Request::OpenMemory(req) => Call::new_wrap(self.open_memory(req), Reply::OpenMemory),
            Request::CloseMemory(req) => Call::new_wrap(self.close_memory(req), Reply::CloseMemory),
            Request::StartExecution(req) => {
                Call::new_wrap(self.start_execution(req), Reply::StartExecution)
            }
            Request::CreateExecutionState(req) => Call::new_wrap(
                self.create_execution_state(req),
                Reply::CreateExecutionState,
            ),
        }
    }
fn dispatch ( & self , req : Request ) -> Call < Reply > { match req { Request :: Terminate ( req ) => Call :: new_wrap ( self . terminate ( req ) , Reply :: Terminate ) , Request :: OpenWasm ( req ) => Call :: new_wrap ( self . open_wasm ( req ) , Reply :: OpenWasm ) , Request :: CloseWasm ( req ) => Call :: new_wrap ( self . close_wasm ( req ) , Reply :: CloseWasm ) , Request :: OpenMemory ( req ) => Call :: new_wrap ( self . open_memory ( req ) , Reply :: OpenMemory ) , Request :: CloseMemory ( req ) => Call :: new_wrap ( self . close_memory ( req ) , Reply :: CloseMemory ) , Request :: StartExecution ( req ) => { Call :: new_wrap ( self . start_execution ( req ) , Reply :: StartExecution ) } Request :: CreateExecutionState ( req ) => Call :: new_wrap ( self . create_execution_state ( req ) , Reply :: CreateExecutionState , ) , } }
Dispatch generic RPC message to target function and produce
matched reply (sync or async)
Dispatch generic RPC message to target function and produce matched reply ( sync or async )
&self
req
Request
&self
req
Request