(&self, timeout: &Pollable)
| 23 | |
| 24 | impl Pollable { |
| 25 | pub fn block_until(&self, timeout: &Pollable) -> Result<(), ErrorCode> { |
| 26 | let ready = poll::poll(&[self, timeout]); |
| 27 | assert!(ready.len() > 0); |
| 28 | match ready[0] { |
| 29 | 0 => Ok(()), |
| 30 | 1 => Err(ErrorCode::Timeout), |
| 31 | _ => unreachable!(), |
| 32 | } |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | impl InputStream { |
no test coverage detected