Struct completion::AssertCompletes[][src]

#[must_use = "futures and streams do nothing unless you use them"]pub struct AssertCompletes<T> { /* fields omitted */ }

Unsafely assert that the inner future or stream will complete.

This will wrap a CompletionFuture or CompletionStream and implement Future or Stream for it respectively.

It can be used in conjunction with MustComplete to apply Future-only combinators to CompletionFutures.

Implementations

impl<T> AssertCompletes<T>[src]

pub unsafe fn new(inner: T) -> Self[src]

Create a new AssertCompletes around a future or stream that must complete.

Safety

This future or stream, once polled, must be polled to completion.

pub fn into_inner(self) -> T[src]

Take the inner item.

Trait Implementations

impl<T: Clone> Clone for AssertCompletes<T>[src]

impl<T: CompletionFuture> CompletionFuture for AssertCompletes<T>[src]

type Output = T::Output

The type of value produced on completion.

impl<T: CompletionStream> CompletionStream for AssertCompletes<T>[src]

type Item = T::Item

Values yielded by the stream.

impl<T: Debug> Debug for AssertCompletes<T>[src]

impl<T> Deref for AssertCompletes<T>[src]

type Target = T

The resulting type after dereferencing.

impl<T> DerefMut for AssertCompletes<T>[src]

impl<T: CompletionFuture> Future for AssertCompletes<T>[src]

type Output = T::Output

The type of value produced on completion.

impl<T: CompletionStream> Stream for AssertCompletes<T>[src]

type Item = T::Item

Values yielded by the stream.

impl<'__pin, T> Unpin for AssertCompletes<T> where
    __Origin<'__pin, T>: Unpin
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for AssertCompletes<T> where
    T: RefUnwindSafe

impl<T> Send for AssertCompletes<T> where
    T: Send

impl<T> Sync for AssertCompletes<T> where
    T: Sync

impl<T> UnwindSafe for AssertCompletes<T> where
    T: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> CompletionFutureExt for T where
    T: CompletionFuture + ?Sized
[src]

impl<T> CompletionStreamExt for T where
    T: CompletionStream + ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> FutureExt for T where
    T: Future
[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<F> IntoFuture for F where
    F: Future
[src]

type Output = <F as Future>::Output

🔬 This is a nightly-only experimental API. (into_future)

The output that the future will produce on completion.

type Future = F

🔬 This is a nightly-only experimental API. (into_future)

Which kind of future are we turning this into?

impl<T> StreamExt for T where
    T: Stream
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<F, T, E> TryFuture for F where
    F: Future<Output = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<S, T, E> TryStream for S where
    S: Stream<Item = Result<T, E>> + ?Sized
[src]

type Ok = T

The type of successful values yielded by this future

type Error = E

The type of failures yielded by this future