(&mut self, ms: u64)
| 188 | |
| 189 | #[inline] |
| 190 | pub async fn next_timeout(&mut self, ms: u64) -> Option<Result<BytesMut, Error>> { |
| 191 | if let Ok(res) = super::timeout(ms, self.next()).await { |
| 192 | res |
| 193 | } else { |
| 194 | None |
| 195 | } |
| 196 | } |
| 197 | |
| 198 | pub fn set_key(&mut self, key: Key) { |
| 199 | self.2 = Some(Encrypt::new(key)); |