[][src]Trait webterm::WebTermExt

pub trait WebTermExt {
    fn webterm_socket<F>(self, endpoint: &str, handler: F) -> Self
    where
        F: Clone + Fn(&HttpRequest) -> Command + 'static
;
fn webterm_ui(
        self,
        endpoint: &str,
        webterm_socket_endpoint: &str,
        static_path: &str
    ) -> Self; }

Trait to extend an actix_web::App by serving a web terminal.

Required methods

fn webterm_socket<F>(self, endpoint: &str, handler: F) -> Self where
    F: Clone + Fn(&HttpRequest) -> Command + 'static, 

Serve the websocket for the webterm

fn webterm_ui(
    self,
    endpoint: &str,
    webterm_socket_endpoint: &str,
    static_path: &str
) -> Self

Loading content...

Implementations on Foreign Types

impl<T, B> WebTermExt for App<T, B> where
    B: MessageBody,
    T: NewService<Config = (), Request = ServiceRequest, Response = ServiceResponse<B>, Error = Error, InitError = ()>, 
[src]

Loading content...

Implementors

Loading content...