Skip to main content

ClassifiedCmdClient

Trait ClassifiedCmdClient 

Source
pub trait ClassifiedCmdClient<LEN: RawEncode + for<'a> RawDecode<'a> + Copy + RawFixedBytes + Sync + Send + 'static + FromPrimitive + ToPrimitive, CMD: RawEncode + for<'a> RawDecode<'a> + Copy + RawFixedBytes + Sync + Send + 'static + Eq + Hash, C: WorkerClassification, M: CmdTunnelMeta, S: CmdSend<M>, G: SendGuard<M, S>>: CmdClient<LEN, CMD, M, S, G> {
    // Required methods
    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;
    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;
    fn send_parts_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;
    fn send_parts_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;
    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;
    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;
    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;
    fn get_send_by_classified<'life0, 'async_trait>(
        &'life0 self,
        classification: C,
    ) -> Pin<Box<dyn Future<Output = CmdResult<G>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;

    // Provided methods
    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: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
    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: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait,
             'life2: 'async_trait { ... }
}

Required Methods§

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 send_parts_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 send_parts_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<G>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Provided Methods§

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: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

👎Deprecated:

use send_parts_by_classified_tunnel instead

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: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

👎Deprecated:

use send_parts_by_classified_tunnel_with_resp instead

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

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 + Eq + Hash + Debug> ClassifiedCmdClient<LEN, CMD, C, M, ClassifiedCmdSend<C, M, R, W, LEN, CMD>, TrackedSendGuard<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>