pub async fn activate_skill(
        &mut self,
        name: String,
        mut msg: MsgSkillRequest,
    ) -> Result<(Vec<PlainCapability>, oneshot::Sender<RequestResponse>), Error> {
        // TODO: Respond to the notification
        let req_id = self.get_id();
        msg.request_id = req_id;
        let (sender, receiver) = oneshot::channel();
        let data = rmp_serde::to_vec(&msg).unwrap();
        self.self_send.send((name, data)).await.unwrap();

        self.pending_requests.lock().await.insert(req_id, sender);

        let resp_data = receiver.await.unwrap();
        Ok(resp_data)
    }
/// Sends a request to a skill
Sends a request to a skill
Sends a request to a skill
pub async fn activate_skill(
        &mut self,
        name: String,
        mut msg: MsgSkillRequest,
    ) -> Result<(Vec<PlainCapability>, oneshot::Sender<RequestResponse>), Error> {
        // TODO: Respond to the notification
        let req_id = self.get_id();
        msg.request_id = req_id;
        let (sender, receiver) = oneshot::channel();
        let data = rmp_serde::to_vec(&msg).unwrap();
        self.self_send.send((name, data)).await.unwrap();
        self.pending_requests.lock().await.insert(req_id, sender);
        let resp_data = receiver.await.unwrap();
        Ok(resp_data)
    }
pub async fn activate_skill ( & mut self , name : String , mut msg : MsgSkillRequest , ) -> Result < ( Vec < PlainCapability > , oneshot :: Sender < RequestResponse > ) , Error > { // TODO: Respond to the notification let req_id = self . get_id ( ) ; msg . request_id = req_id ; let ( sender , receiver ) = oneshot :: channel ( ) ; let data = rmp_serde :: to_vec ( & msg ) . unwrap ( ) ; self . self_send . send ( ( name , data ) ) . await . unwrap ( ) ; self . pending_requests . lock ( ) . await . insert ( req_id , sender ) ; let resp_data = receiver . await . unwrap ( ) ; Ok ( resp_data ) }
Sends a request to a skill
Sends a request to a skill
&mut self
name
String
msg
MsgSkillRequest