fedimint_core::util

Trait NextOrPending

Source
pub trait NextOrPending {
    type Output;

    // Required methods
    fn next_or_pending<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn ok<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}

Required Associated Types§

Required Methods§

Source

fn next_or_pending<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Self::Output> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source

fn ok<'life0, 'async_trait>( &'life0 mut self, ) -> Pin<Box<dyn Future<Output = Result<Self::Output>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Implementors§

Source§

impl<S> NextOrPending for S
where S: Stream + Unpin + MaybeSend, S::Item: MaybeSend,

Source§

type Output = <S as Stream>::Item