Repack a message, and return a new envelope with the message
(&self, msg: T)
| 86 | } |
| 87 | /// Repack a message, and return a new envelope with the message |
| 88 | pub fn repack<T>(&self, msg: T) -> Envelope<T> { |
| 89 | Envelope { |
| 90 | msg: Some(msg), |
| 91 | info: self.info.clone(), |
| 92 | } |
| 93 | } |
| 94 | /// Repack a message in place |
| 95 | pub fn repack_inplace(&mut self, msg: M) { |
| 96 | self.msg = Some(msg); |