Drain up to `max` requests into the buffer.
(&mut self, buf: &mut Vec<Req>, max: usize)
| 213 | |
| 214 | /// Drain up to `max` requests into the buffer. |
| 215 | pub fn drain_requests(&mut self, buf: &mut Vec<Req>, max: usize) -> usize { |
| 216 | let count = self.consumer.drain_into(buf, max); |
| 217 | if count > 0 { |
| 218 | let _ = self.req_wake.producer_wake.notify(); |
| 219 | } |
| 220 | count |
| 221 | } |
| 222 | |
| 223 | /// Try to send a response back to the Control Plane. |
| 224 | pub fn try_send_response(&mut self, rsp: Rsp) -> Result<()> { |