Trait TransportOperations
pub trait TransportOperations: Send + Sync {
type Observable: EdgeObservable + Send;
type Error: Error + Send + Sync + 'static;
// Required methods
fn ping<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<(Duration, Self::Observable), Self::Error>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
fn observed_multiaddresses<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Vec<Multiaddr>> + Send + 'async_trait>>
where 'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait;
}Expand description
Minimal transport operations that require the full transport stack.
Peer observations and quality queries should use HasGraphView instead.
Session management (connect_to) is handled at the hopr-lib level.
Required Associated Types§
type Observable: EdgeObservable + Send
type Observable: EdgeObservable + Send
Observable type for peer quality measurements.
Required Methods§
fn ping<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<(Duration, Self::Observable), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn ping<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Result<(Duration, Self::Observable), Self::Error>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Pings a peer, returns the round-trip time and quality observations.
fn observed_multiaddresses<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Vec<Multiaddr>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
fn observed_multiaddresses<'life0, 'life1, 'async_trait>(
&'life0 self,
key: &'life1 OffchainPublicKey,
) -> Pin<Box<dyn Future<Output = Vec<Multiaddr>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
Self: 'async_trait,
Returns the observed multiaddresses for a peer.