Type Alias ReconnectCallback

Source
pub type ReconnectCallback = Arc<dyn Fn() -> LocalBoxFuture<'static, Result<(), Box<dyn Error>>> + Send + Sync>;
Expand description

The type of the reconnect parameter passed to [Client::handle_error}, and to the callback closure of Client::on_error.

Calling this function from a Client::on_error closure should run the (implementation specific) client reconnect logic, e.g. rebindign a websocket.

Aliased Typeยง

struct ReconnectCallback { /* private fields */ }