#[cfg(all(feature = "aws-lc-rs", feature = "ring"))]
compile_error!("features \"aws-lc-rs\" and \"ring\" are mutually exclusive.");
#[cfg(not(any(feature = "aws-lc-rs", feature = "ring")))]
compile_error!("either \"aws-lc-rs\" or \"ring\" must be enabled to use the ws module.");
#[cfg(all(feature = "tokio-tungstenite", feature = "tokio-websockets"))]
compile_error!("features \"tokio-tungstenite\" and \"tokio-websockets\" are mutually exclusive.");
mod channel;
mod error;
mod io;
mod request;
mod run;
mod upgrade;
#[cfg(any(feature = "aws-lc-rs", feature = "ring"))]
mod sha1;
pub use channel::*;
pub use error::{Result, ResultExt};
pub use request::Request;
pub use upgrade::Ws;
pub fn ws<T, App, Await>(listener: T) -> Ws<T>
where
T: Fn(Channel, Request<App>) -> Await,
Await: Future<Output = Result> + Send,
{
Ws::new(listener)
}