ngrok::config

Trait ForwarderBuilder

Source
pub trait ForwarderBuilder: TunnelBuilder {
    // Required method
    fn listen_and_forward<'life0, 'async_trait>(
        &'life0 self,
        to_url: Url,
    ) -> Pin<Box<dyn Future<Output = Result<Forwarder<Self::Tunnel>, RpcError>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait representing things that can be built into an ngrok tunnel and then forwarded to a provided URL.

Required Methods§

Source

fn listen_and_forward<'life0, 'async_trait>( &'life0 self, to_url: Url, ) -> Pin<Box<dyn Future<Output = Result<Forwarder<Self::Tunnel>, RpcError>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Start listening for new connections on this tunnel and forward all connections to the provided URL.

This will also set the forwards_to metadata for the tunnel.

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§