ProtocolSdk

Trait ProtocolSdk 

Source
pub trait ProtocolSdk:
    MessageSender
    + Clone
    + Send {
    // Provided methods
    fn send_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        instance_id: Uuid,
        code: ErrorCode,
        msg: &'life1 str,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait,
             'life1: 'async_trait { ... }
    fn send_close_connection<'life0, 'async_trait>(
        &'life0 self,
        instance_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn send_data<'life0, 'async_trait>(
        &'life0 self,
        instance_id: Uuid,
        data: Vec<u8>,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn send_connection_established_status<'life0, 'async_trait>(
        &'life0 self,
        instance_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
    fn send_handshake<'life0, 'async_trait>(
        &'life0 self,
        instance_id: Uuid,
    ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
       where Self: Sync + 'async_trait,
             'life0: 'async_trait { ... }
}
Expand description

A trait to send port forwarding protocol messages.

This trait provides an abstraction layer for sending various types of port forwarding protocol messages.

Provided Methods§

Source

fn send_error<'life0, 'life1, 'async_trait>( &'life0 self, instance_id: Uuid, code: ErrorCode, msg: &'life1 str, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Send an error message.

Source

fn send_close_connection<'life0, 'async_trait>( &'life0 self, instance_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a message to close a connection.

Source

fn send_data<'life0, 'async_trait>( &'life0 self, instance_id: Uuid, data: Vec<u8>, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a message with data transfer.

Source

fn send_connection_established_status<'life0, 'async_trait>( &'life0 self, instance_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a message indicating that a connection has been established.

Source

fn send_handshake<'life0, 'async_trait>( &'life0 self, instance_id: Uuid, ) -> Pin<Box<dyn Future<Output = Result<(), Error>> + Send + 'async_trait>>
where Self: Sync + 'async_trait, 'life0: 'async_trait,

Send a handshake message.

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§