Trait ClassifiedWorker

Source
pub trait ClassifiedWorker<C>: Send + 'static{
    // Required methods
    fn is_work(&self) -> bool;
    fn is_valid(&self, c: C) -> bool;
    fn classification(&self) -> C;
}

Required Methods§

Source

fn is_work(&self) -> bool

Source

fn is_valid(&self, c: C) -> bool

Source

fn classification(&self) -> C

Implementors§

Source§

impl<C, R, W, LEN, CMD> ClassifiedWorker<CmdClientTunnelClassification<C>> for ClassifiedCmdSend<C, R, W, LEN, CMD>
where C: WorkerClassification, R: ClassifiedCmdTunnelRead<C>, W: ClassifiedCmdTunnelWrite<C>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + Debug,

Source§

impl<C, R, W, LEN, CMD> ClassifiedWorker<CmdNodeTunnelClassification<C>> for ClassifiedCmdSend<C, R, W, LEN, CMD>
where C: WorkerClassification, R: ClassifiedCmdTunnelRead<C>, W: ClassifiedCmdTunnelWrite<C>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + Debug,

Source§

impl<R, W, LEN, CMD> ClassifiedWorker<(PeerId, Option<TunnelId>)> for CmdSend<R, W, LEN, CMD>
where R: CmdTunnelRead, W: CmdTunnelWrite, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + Debug,

Source§

impl<R, W, LEN, CMD> ClassifiedWorker<TunnelId> for CmdSend<R, W, LEN, CMD>
where R: CmdTunnelRead, W: CmdTunnelWrite, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + Debug,