ClassifiedWorkerFactory

Trait ClassifiedWorkerFactory 

Source
pub trait ClassifiedWorkerFactory<C, W>:
    Send
    + Sync
    + 'static{
    // Required method
    fn create<'life0, 'async_trait>(
        &'life0 self,
        c: Option<C>,
    ) -> Pin<Box<dyn Future<Output = Result<W, Error<PoolErrorCode>>> + Send + 'async_trait>>
       where 'life0: 'async_trait,
             Self: 'async_trait;
}

Required Methods§

Source

fn create<'life0, 'async_trait>( &'life0 self, c: Option<C>, ) -> Pin<Box<dyn Future<Output = Result<W, Error<PoolErrorCode>>> + Send + 'async_trait>>
where 'life0: 'async_trait, Self: 'async_trait,

Implementors§

Source§

impl<C: WorkerClassification, M: CmdTunnelMeta, R: ClassifiedCmdTunnelRead<C, M>, W: ClassifiedCmdTunnelWrite<C, M>, F: ClassifiedCmdTunnelFactory<C, M, R, W>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive + RawFixedBytes, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + RawFixedBytes + Debug> ClassifiedWorkerFactory<CmdClientTunnelClassification<C>, ClassifiedCmdSend<C, M, R, W, LEN, CMD>> for ClassifiedCmdWriteFactory<C, M, R, W, F, LEN, CMD>

Source§

impl<C: WorkerClassification, M: CmdTunnelMeta, R: ClassifiedCmdTunnelRead<C, M>, W: ClassifiedCmdTunnelWrite<C, M>, F: ClassifiedCmdNodeTunnelFactory<C, M, R, W>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive + RawFixedBytes, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + RawFixedBytes + Debug, LISTENER: CmdTunnelListener<M, R, W>> ClassifiedWorkerFactory<CmdNodeTunnelClassification<C>, ClassifiedCmdSend<C, M, R, W, LEN, CMD>> for ClassifiedCmdNodeWriteFactory<C, M, R, W, F, LEN, CMD, LISTENER>

Source§

impl<M: CmdTunnelMeta, R: CmdTunnelRead<M>, W: CmdTunnelWrite<M>, F: CmdTunnelFactory<M, R, W>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive + RawFixedBytes, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + RawFixedBytes + Debug> ClassifiedWorkerFactory<TunnelId, CommonCmdSend<M, R, W, LEN, CMD>> for CmdWriteFactory<M, R, W, F, LEN, CMD>

Source§

impl<M: CmdTunnelMeta, R: CmdTunnelRead<M>, W: CmdTunnelWrite<M>, F: CmdNodeTunnelFactory<M, R, W>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive + RawFixedBytes, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + RawFixedBytes + Debug, LISTENER: CmdTunnelListener<M, R, W>> ClassifiedWorkerFactory<(PeerId, Option<TunnelId>), CommonCmdSend<M, R, W, LEN, CMD>> for CmdNodeWriteFactory<M, R, W, F, LEN, CMD, LISTENER>