Skip to main content

CoTryStreamExt

Trait CoTryStreamExt 

Source
pub trait CoTryStreamExt: Stream<Item = Result<Self::Ok, Self::Error>> {
    type Ok;
    type Error;

    // Provided methods
    fn try_first<'async_trait>(
        self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Ok>, Self::Error>> + Send + 'async_trait>>
       where Self: Sized + Send + 'async_trait { ... }
    fn try_ignore_elements<T>(self) -> TryIgnoreElements<Self, T>
       where Self: Sized { ... }
}

Required Associated Types§

Provided Methods§

Source

fn try_first<'async_trait>( self, ) -> Pin<Box<dyn Future<Output = Result<Option<Self::Ok>, Self::Error>> + Send + 'async_trait>>
where Self: Sized + Send + 'async_trait,

Source

fn try_ignore_elements<T>(self) -> TryIgnoreElements<Self, T>
where Self: Sized,

Ignore all elements by only forwarding errors.

Implementors§

Source§

impl<S, T, E> CoTryStreamExt for S
where S: ?Sized + Stream<Item = Result<T, E>>,

Source§

type Ok = T

Source§

type Error = E