hopr_transport_session/traits.rs
1use crate::errors::TransportSessionError;
2use hopr_internal_types::protocol::ApplicationData;
3use hopr_network_types::prelude::RoutingOptions;
4use libp2p_identity::PeerId;
5
6#[cfg_attr(test, mockall::automock)]
7#[async_trait::async_trait]
8pub trait SendMsg {
9 async fn send_message(
10 &self,
11 data: ApplicationData,
12 destination: PeerId,
13 options: RoutingOptions,
14 ) -> std::result::Result<(), TransportSessionError>;
15}