Drain up to `max` responses into the buffer.
(&mut self, buf: &mut Vec<Rsp>, max: usize)
| 165 | |
| 166 | /// Drain up to `max` responses into the buffer. |
| 167 | pub fn drain_responses(&mut self, buf: &mut Vec<Rsp>, max: usize) -> usize { |
| 168 | let count = self.consumer.drain_into(buf, max); |
| 169 | if count > 0 { |
| 170 | let _ = self.rsp_wake.producer_wake.notify(); |
| 171 | } |
| 172 | count |
| 173 | } |
| 174 | |
| 175 | /// Current backpressure state. |
| 176 | pub fn pressure(&self) -> PressureState { |