Trait jlrs::traits::multitask::ReturnChannel[][src]

pub trait ReturnChannel: 'static {
    type T: Send + Sync + 'static;
#[must_use]    fn send<'life0, 'async_trait>(
        &'life0 self,
        response: JlrsResult<Self::T>
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; }

The ReturnChannel trait is implemented by types that can send a result back to a caller. It is implemented for both async_std::sync::Sender and crossbeam_channel::Sender.

Associated Types

type T: Send + Sync + 'static[src]

Loading content...

Required methods

#[must_use]fn send<'life0, 'async_trait>(
    &'life0 self,
    response: JlrsResult<Self::T>
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>> where
    'life0: 'async_trait,
    Self: 'async_trait, 
[src]

Send the result.

Loading content...

Implementations on Foreign Types

impl<T: Send + Sync + 'static> ReturnChannel for AsyncStdSender<JlrsResult<T>>[src]

type T = T

impl<T: Send + Sync + 'static> ReturnChannel for CrossbeamSender<JlrsResult<T>>[src]

type T = T

Loading content...

Implementors

Loading content...