(&self)
| 52 | } |
| 53 | } |
| 54 | fn check_write(&self) -> Result<usize, StreamError> { |
| 55 | let mut state = self.state(); |
| 56 | if let Err(e) = state.check_error() { |
| 57 | return Err(e); |
| 58 | } |
| 59 | |
| 60 | if state.flush_pending || state.write_budget == 0 { |
| 61 | return Ok(0); |
| 62 | } |
| 63 | |
| 64 | Ok(state.write_budget) |
| 65 | } |
| 66 | fn state(&self) -> std::sync::MutexGuard<'_, WorkerState> { |
| 67 | self.state.lock().unwrap() |
| 68 | } |
nothing calls this directly
no test coverage detected