Struct warp::filters::ws::Ws2 [−][src]
pub struct Ws2 { /* fields omitted */ }
Extracted by the ws2
filter, and used to finish an upgrade.
Methods
impl Ws2
[src]
impl Ws2
pub fn on_upgrade<F, U>(
self,
func: F
) -> impl Reply where
F: FnOnce(WebSocket) -> U + Send + 'static,
U: Future<Item = (), Error = ()> + Send + 'static,
[src]
pub fn on_upgrade<F, U>(
self,
func: F
) -> impl Reply where
F: FnOnce(WebSocket) -> U + Send + 'static,
U: Future<Item = (), Error = ()> + Send + 'static,
Finish the upgrade, passing a function to handle the WebSocket
.
The passed function must return a Future
.