Trait ngrok::session::CommandHandler

source ·
pub trait CommandHandler<T>: Send + Sync + 'static {
    // Required method
    fn handle_command<'life0, 'async_trait>(
        &'life0 self,
        req: T
    ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Trait for a type that can handle a command from the ngrok dashboard.

Required Methods§

source

fn handle_command<'life0, 'async_trait>( &'life0 self, req: T ) -> Pin<Box<dyn Future<Output = Result<(), String>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

Handle the remote command.

Implementors§

source§

impl<R, T, F> CommandHandler<R> for T
where R: Send + 'static, T: Fn(R) -> F + Send + Sync + 'static, F: Future<Output = Result<(), String>> + Send,