/// 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::ExecutionFinished(req) => {
                Call::new_wrap(self.execution_finished(req), Reply::ExecutionFinished)
            }
            Request::CanisterSystemCall(req) => {
                Call::new_wrap(self.canister_system_call(req), |rep| {
                    Reply::CanisterSystemCall(rep)
                })
            }
            Request::LogViaReplica(req) => {
                Call::new_wrap(self.log_via_replica(req), Reply::LogViaReplica)
            }
        }
    }
fn dispatch ( & self , req : Request ) -> Call < Reply > { match req { Request :: ExecutionFinished ( req ) => { Call :: new_wrap ( self . execution_finished ( req ) , Reply :: ExecutionFinished ) } Request :: CanisterSystemCall ( req ) => { Call :: new_wrap ( self . canister_system_call ( req ) , | rep | { Reply :: CanisterSystemCall ( rep ) } ) } Request :: LogViaReplica ( req ) => { Call :: new_wrap ( self . log_via_replica ( req ) , Reply :: LogViaReplica ) } } }
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