pub async fn deliver(&mut self, res: Response) -> bool {
        let id = res.origin_id;

        let success = if let Some(tx) = self.mailboxes.get_mut(&id) {
            tx.send(res).await.is_ok()
        } else {
            false
        };

        // If failed, we want to remove the mailbox sender as it is no longer valid
        if !success {
            self.mailboxes.remove(&id);
        }

        success
    }
/// Delivers a response to appropriate mailbox, returning false if no mailbox is found
/// for the response or if the mailbox is no longer receiving responses
Delivers a response to appropriate mailbox, returning false if no mailbox is found
for the response or if the mailbox is no longer receiving responses
Delivers a response to appropriate mailbox returning false if no mailbox is found for the response or if the mailbox is no longer receiving responses
pub async fn deliver(&mut self, res: Response) -> bool {
        let id = res.origin_id;
        let success = if let Some(tx) = self.mailboxes.get_mut(&id) {
            tx.send(res).await.is_ok()
        } else {
            false
        };
        // If failed, we want to remove the mailbox sender as it is no longer valid
        if !success {
            self.mailboxes.remove(&id);
        }
        success
    }
pub async fn deliver ( & mut self , res : Response ) -> bool { let id = res . origin_id ; let success = if let Some ( tx ) = self . mailboxes . get_mut ( & id ) { tx . send ( res ) . await . is_ok ( ) } else { false } ; // If failed, we want to remove the mailbox sender as it is no longer valid if ! success { self . mailboxes . remove ( & id ) ; } success }
Delivers a response to appropriate mailbox, returning false if no mailbox is found
for the response or if the mailbox is no longer receiving responses
Delivers a response to appropriate mailbox returning false if no mailbox is found for the response or if the mailbox is no longer receiving responses
&mut self
res
Response