[−][src]Trait completion_core::CompletionStream
A Stream
where each value must be polled to completion.
All types that implement Stream
should also implement this.
Associated Types
Loading content...Required methods
pub unsafe fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
Attempt to pull out the next value of this stream, registering the current task for wakeup
if the value is not yet available, and returning None
if the stream is exhausted.
Safety
Once this function is called and the type does not also implement Stream
, the user
must not drop or forget the stream until it has returned Poll::Ready
or panicked.
Note that users may drop the stream in between finishing polling one item and starting to
poll the next.
Provided methods
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
Returns the bounds on the remaining length of the stream.
See Stream::size_hint
for more details.
Implementations on Foreign Types
impl<S: CompletionStream + Unpin + ?Sized> CompletionStream for &mut S
[src]
type Item = S::Item
pub unsafe fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
mut self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<S: CompletionStream + Unpin + ?Sized> CompletionStream for Box<S>
[src]
type Item = S::Item
pub unsafe fn poll_next(
mut self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
mut self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<P> CompletionStream for Pin<P> where
P: Unpin + DerefMut,
P::Target: CompletionStream,
[src]
P: Unpin + DerefMut,
P::Target: CompletionStream,
type Item = <P::Target as CompletionStream>::Item
pub unsafe fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
pub fn size_hint(&self) -> (usize, Option<usize>)
[src]
impl<S: CompletionStream> CompletionStream for AssertUnwindSafe<S>
[src]
type Item = S::Item
pub unsafe fn poll_next(
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>
[src]
self: Pin<&mut Self>,
cx: &mut Context<'_>
) -> Poll<Option<Self::Item>>