(&mut self, f: F)
| 140 | } |
| 141 | |
| 142 | fn send<F: FnOnce(&mut BytesMut)>(&mut self, f: F) -> anyhow::Result<()> { |
| 143 | self.send_buf.clear(); |
| 144 | f(&mut self.send_buf); |
| 145 | self.stream.write_all(&self.send_buf)?; |
| 146 | Ok(()) |
| 147 | } |
| 148 | fn until( |
| 149 | &mut self, |
| 150 | until: Vec<&str>, |