pub trait RelayedDialer: Send + Sync {
// Required methods
fn relay_endpoint(&self) -> SocketAddr;
fn is_ready(&self) -> bool;
fn open_dial_tunnel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RelayTunnel, String>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
}Expand description
A relayed transport that opens the DUPLEX BYTE TUNNEL an mTLS session runs over — the transport
half of the tier-6 relayed dial. Distinct from RelayedTransport (which only reports a probe
endpoint): this yields the actual byte channel, so a relayed connection carries the SAME dig-tls
mTLS + peer_id pin + BLS binding as a direct one (the relay forwards ciphertext it cannot read).
crate::connect composes the relayed tier only when a RelayedDialer is supplied via the
runtime carrier; the crate::dialer::MtlsDialer uses it to open the tunnel for a
TraversalKind::Relayed outcome, then runs the identical handshake over it.
Required Methods§
Sourcefn relay_endpoint(&self) -> SocketAddr
fn relay_endpoint(&self) -> SocketAddr
The relay endpoint the tunnel forwards through (observability + the relayed dial address).
Sourcefn is_ready(&self) -> bool
fn is_ready(&self) -> bool
Whether a relayed tunnel can currently be opened (a reservation is held). The relayed method’s
attempt gates on this so an unavailable relay falls through
cleanly rather than producing a doomed dial.
Sourcefn open_dial_tunnel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RelayTunnel, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn open_dial_tunnel<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
target_peer: &'life1 str,
network_id: &'life2 str,
) -> Pin<Box<dyn Future<Output = Result<RelayTunnel, String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Open a live duplex tunnel to target_peer (hex peer_id) on network_id. Err if the
reservation is not held. The returned RelayTunnel is wrapped in a byte-stream adapter and
the mTLS handshake runs over it.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".