ClassifiedCmdSend

Struct ClassifiedCmdSend 

Source
pub struct ClassifiedCmdSend<C, M, R, W, LEN, CMD>
where C: WorkerClassification, M: CmdTunnelMeta, R: ClassifiedCmdTunnelRead<C, M>, W: ClassifiedCmdTunnelWrite<C, M>, LEN: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + Send + Sync + 'static + Debug + RawFixedBytes,
{ /* private fields */ }

Implementations§

Source§

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

Source

pub fn get_tunnel_id(&self) -> TunnelId

Source

pub fn set_disable(&mut self)

Source

pub async fn send( &mut self, cmd: CMD, version: u8, body: &[u8], ) -> CmdResult<()>

Source

pub async fn send_with_resp( &mut self, cmd: CMD, version: u8, body: &[u8], timeout: Duration, ) -> CmdResult<CmdBody>

Source

pub async fn send2( &mut self, cmd: CMD, version: u8, body: &[&[u8]], ) -> CmdResult<()>

Source

pub async fn send2_with_resp( &mut self, cmd: CMD, version: u8, body: &[&[u8]], timeout: Duration, ) -> CmdResult<CmdBody>

Source

pub async fn send_cmd( &mut self, cmd: CMD, version: u8, body: CmdBody, ) -> CmdResult<()>

Source

pub async fn send_cmd_with_resp( &mut self, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> CmdResult<CmdBody>

Trait Implementations§

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 + Eq + Hash + Debug> ClassifiedCmdClient<LEN, CMD, C, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedSendGuard<CmdClientTunnelClassification<C>, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedCmdWriteFactory<C, M, R, W, F, LEN, CMD>>> for DefaultClassifiedCmdClient<C, M, R, W, F, LEN, CMD>

Source§

fn send_by_classified_tunnel<'life0, 'life1, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_by_classified_tunnel_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send2_by_classified_tunnel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_by_classified_tunnel_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_cmd_by_classified_tunnel<'life0, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_cmd_by_classified_tunnel_with_resp<'life0, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_tunnel_id_by_classified<'life0, 'async_trait>( &'life0 self, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<TunnelId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_send_by_classified<'life0, 'async_trait>( &'life0 self, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<ClassifiedSendGuard<CmdClientTunnelClassification<C>, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedCmdWriteFactory<C, M, R, W, F, LEN, CMD>>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 + Eq + Hash + Debug, LISTENER: CmdTunnelListener<M, R, W>> ClassifiedCmdNode<LEN, CMD, C, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedSendGuard<CmdNodeTunnelClassification<C>, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedCmdNodeWriteFactory<C, M, R, W, F, LEN, CMD, LISTENER>>> for DefaultClassifiedCmdNode<C, M, R, W, F, LEN, CMD, LISTENER>

Source§

fn send_by_classified_tunnel<'life0, 'life1, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_by_classified_tunnel_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send2_by_classified_tunnel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_by_classified_tunnel_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_cmd_by_classified_tunnel<'life0, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_cmd_by_classified_tunnel_with_resp<'life0, 'async_trait>( &'life0 self, classification: C, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_by_peer_classified_tunnel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_by_peer_classified_tunnel_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: &'life2 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_by_peer_classified_tunnel<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send2_by_peer_classified_tunnel_with_resp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send_cmd_by_peer_classified_tunnel<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_cmd_by_peer_classified_tunnel_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn find_tunnel_id_by_classified<'life0, 'async_trait>( &'life0 self, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<TunnelId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn find_tunnel_id_by_peer_classified<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<TunnelId>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn get_send_by_classified<'life0, 'async_trait>( &'life0 self, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<ClassifiedCmdNodeSendGuard<C, M, R, W, F, LEN, CMD, LISTENER>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn get_send_by_peer_classified<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, classification: C, ) -> Pin<Box<dyn Future<Output = CmdResult<ClassifiedCmdNodeSendGuard<C, M, R, W, F, LEN, CMD, LISTENER>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

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

Source§

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

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§

fn create<'life0, 'async_trait>( &'life0 self, classification: Option<CmdClientTunnelClassification<C>>, ) -> Pin<Box<dyn Future<Output = PoolResult<ClassifiedCmdSend<C, M, R, W, LEN, CMD>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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§

fn create<'life0, 'async_trait>( &'life0 self, c: Option<CmdNodeTunnelClassification<C>>, ) -> Pin<Box<dyn Future<Output = PoolResult<ClassifiedCmdSend<C, M, R, W, LEN, CMD>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 + Eq + Hash + Debug> CmdClient<LEN, CMD, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedSendGuard<CmdClientTunnelClassification<C>, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedCmdWriteFactory<C, M, R, W, F, LEN, CMD>>> for DefaultClassifiedCmdClient<C, M, R, W, F, LEN, CMD>

Source§

fn register_cmd_handler(&self, cmd: CMD, handler: impl CmdHandler<LEN, CMD>)

Source§

fn send<'life0, 'life1, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send2<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_cmd<'life0, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_cmd_with_resp<'life0, 'async_trait>( &'life0 self, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_by_specify_tunnel<'life0, 'life1, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life1 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_by_specify_tunnel_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life1 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send2_by_specify_tunnel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_by_specify_tunnel_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life1 [&'life2 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_cmd_by_specify_tunnel<'life0, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

fn send_cmd_by_specify_tunnel_with_resp<'life0, 'async_trait>( &'life0 self, tunnel_id: TunnelId, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Source§

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

Source§

fn get_send<'life0, 'async_trait>( &'life0 self, tunnel_id: TunnelId, ) -> Pin<Box<dyn Future<Output = CmdResult<ClassifiedClientSendGuard<C, M, R, W, F, LEN, CMD>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

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 + Eq + Hash + Debug, LISTENER: CmdTunnelListener<M, R, W>> CmdNode<LEN, CMD, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedSendGuard<CmdNodeTunnelClassification<C>, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, ClassifiedCmdNodeWriteFactory<C, M, R, W, F, LEN, CMD, LISTENER>>> for DefaultClassifiedCmdNode<C, M, R, W, F, LEN, CMD, LISTENER>

Source§

fn register_cmd_handler(&self, cmd: CMD, handler: impl CmdHandler<LEN, CMD>)

Source§

fn send<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: &'life2 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send2_with_resp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send_cmd<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_cmd_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_by_specify_tunnel<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life2 [u8], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send_by_specify_tunnel_with_resp<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life2 [u8], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn send2_by_specify_tunnel<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send2_by_specify_tunnel_with_resp<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: &'life2 [&'life3 [u8]], timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn send_cmd_by_specify_tunnel<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: CmdBody, ) -> Pin<Box<dyn Future<Output = CmdResult<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn send_cmd_by_specify_tunnel_with_resp<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, cmd: CMD, version: u8, body: CmdBody, timeout: Duration, ) -> Pin<Box<dyn Future<Output = CmdResult<CmdBody>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

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

Source§

fn get_send<'life0, 'life1, 'async_trait>( &'life0 self, peer_id: &'life1 PeerId, tunnel_id: TunnelId, ) -> Pin<Box<dyn Future<Output = CmdResult<ClassifiedCmdNodeSendGuard<C, M, R, W, F, LEN, CMD, LISTENER>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

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

Source§

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

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

§

impl<C, M, R, W, LEN, CMD> Freeze for ClassifiedCmdSend<C, M, R, W, LEN, CMD>
where C: Freeze,

§

impl<C, M, R, W, LEN, CMD> RefUnwindSafe for ClassifiedCmdSend<C, M, R, W, LEN, CMD>

§

impl<C, M, R, W, LEN, CMD> Send for ClassifiedCmdSend<C, M, R, W, LEN, CMD>

§

impl<C, M, R, W, LEN, CMD> Sync for ClassifiedCmdSend<C, M, R, W, LEN, CMD>
where C: Sync,

§

impl<C, M, R, W, LEN, CMD> Unpin for ClassifiedCmdSend<C, M, R, W, LEN, CMD>
where C: Unpin, LEN: Unpin, CMD: Unpin,

§

impl<C, M, R, W, LEN, CMD> UnwindSafe for ClassifiedCmdSend<C, M, R, W, LEN, CMD>
where C: UnwindSafe, M: RefUnwindSafe, LEN: UnwindSafe, CMD: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

Source§

fn type_name(&self) -> &'static str

Gets the type name of self
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast for T
where T: AsAny + ?Sized,

Source§

fn is<T>(&self) -> bool
where T: AsAny,

Returns true if the boxed type is the same as T. Read more
Source§

fn downcast_ref<T>(&self) -> Option<&T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>
where T: AsAny,

Forward to the method defined on the type Any.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> CmdTunnelMeta for T
where T: Send + Sync + 'static,