pub trait AppSender: Send + Sync + CloneBox {
    // Required methods
    fn send_app_request<'life0, 'async_trait>(
        &'life0 self,
        node_ids: Set,
        request_id: u32,
        request: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_app_response<'life0, 'async_trait>(
        &'life0 self,
        node_if: Id,
        request_id: u32,
        response: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_app_gossip<'life0, 'async_trait>(
        &'life0 self,
        msg: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_app_gossip_specific<'life0, 'async_trait>(
        &'life0 self,
        node_ids: Set,
        msg: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_cross_chain_app_request<'life0, 'async_trait>(
        &'life0 self,
        chain_id: Id,
        request_id: u32,
        app_request_bytes: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn send_cross_chain_app_response<'life0, 'async_trait>(
        &'life0 self,
        chain_id: Id,
        request_id: u32,
        app_response_bytes: Vec<u8>
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

AppSender sends application (Vm) level messages.

ref. https://pkg.go.dev/github.com/ava-labs/avalanchego/snow/engine/common#AppSender

Required Methods§

source

fn send_app_request<'life0, 'async_trait>( &'life0 self, node_ids: Set, request_id: u32, request: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_app_response<'life0, 'async_trait>( &'life0 self, node_if: Id, request_id: u32, response: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_app_gossip<'life0, 'async_trait>( &'life0 self, msg: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_app_gossip_specific<'life0, 'async_trait>( &'life0 self, node_ids: Set, msg: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_cross_chain_app_request<'life0, 'async_trait>( &'life0 self, chain_id: Id, request_id: u32, app_request_bytes: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

source

fn send_cross_chain_app_response<'life0, 'async_trait>( &'life0 self, chain_id: Id, request_id: u32, app_response_bytes: Vec<u8> ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where Self: 'async_trait, 'life0: 'async_trait,

Trait Implementations§

source§

impl Clone for Box<dyn AppSender + Send + Sync>

source§

fn clone(&self) -> Box<dyn AppSender + Send + Sync>

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Implementors§