Lines Matching refs:Poll
7 use std::task::{Context, Poll, ready};
13 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()>; in poll_ready() argument
17 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()> { in poll_ready() argument
23 fn poll_ready(&mut self, cx: &mut Context<'_>) -> Poll<()> { in poll_ready() argument
116 ) -> Poll<io::Result<()>> { in poll_read()
120 Poll::Ready(Ok(())) in poll_read()
122 Some(Err(e)) => Poll::Ready(Err(e)), in poll_read()
125 None => Poll::Ready(Ok(())), in poll_read()
222 ) -> Poll<io::Result<usize>> { in poll_write()
224 Some(Ok(())) => Poll::Ready(Ok(buf.len())), in poll_write()
225 Some(Err(e)) => Poll::Ready(Err(e)), in poll_write()
226 None => Poll::Ready(Ok(0)), in poll_write()
229 fn poll_flush(self: Pin<&mut Self>, cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_flush()
231 Some(result) => Poll::Ready(result), in poll_flush()
232 None => Poll::Ready(Ok(())), in poll_flush()
235 fn poll_shutdown(self: Pin<&mut Self>, _cx: &mut Context<'_>) -> Poll<io::Result<()>> { in poll_shutdown()
236 Poll::Ready(Ok(())) in poll_shutdown()
265 ) -> Poll<Option<io::Result<T>>> { in poll()
283 None => return Poll::Ready(None), in poll()
289 Poll::Ready(()) => {} in poll()
293 Poll::Pending => { in poll()
295 return Poll::Pending; in poll()
305 Poll::Ready(Some(Ok(result))) in poll()
310 Err(p2::StreamError::Closed) => Poll::Ready(None), in poll()
317 Poll::Ready(Some(Err(e.downcast().unwrap()))) in poll()