Skip to main content

OnFailedUpgrade

Trait OnFailedUpgrade 

pub trait OnFailedUpgrade: Send + 'static {
    // Required method
    fn call(self, error: Error);
}
Expand description

What to do when a connection upgrade fails.

See WebSocketUpgrade::on_failed_upgrade for more details.

Required Methods§

fn call(self, error: Error)

Call the callback.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

§

impl OnFailedUpgrade for DefaultOnFailedUpgrade

§

impl<F> OnFailedUpgrade for F
where F: FnOnce(Error) + Send + 'static,