from: Pid, cid: Option<CorrelationId>, output: &mut Vec<Envelope<T>>) { match msg { Msg::User(Hello) => { let to = from; // P1 let from = self.pid.clone(); // P2 let msg = Msg::User(Hello); let reply = Envelope::new(to, from, msg, cid); output.push(reply); }, _ => () } }