InputPort

Trait InputPort 

Source
pub trait InputPort<T: Send>: Port<T> {
    // Required methods
    fn is_empty(&self) -> bool;
    fn recv<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Option<T>, RecvError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided method
    fn recv_all<'life0, 'async_trait>(
        &'life0 mut self,
    ) -> Pin<Box<dyn Future<Output = Result<Vec<T>, RecvError>> + Send + 'async_trait>>
       where Self: Send + 'async_trait,
             'life0: 'async_trait { ... }
}

Required Methods§

Source

fn is_empty(&self) -> bool

Checks if this port is empty.

Source

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

Provided Methods§

Source

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

Implementors§

Source§

impl<T: Send + 'static, const N: usize> InputPort<T> for Inputs<T, N>