diff --git a/src/handshake/client.rs b/src/handshake/client.rs index 0700fa2..cc3816a 100644 --- a/src/handshake/client.rs +++ b/src/handshake/client.rs @@ -94,7 +94,7 @@ impl HandshakeRole for ClientHandshake { } /// Verifies and generates a client WebSocket request from the original request and extracts a WebSocket key from it. -fn generate_request(mut request: Request) -> Result<(Vec, String)> { +pub fn generate_request(mut request: Request) -> Result<(Vec, String)> { let mut req = Vec::new(); write!( req, diff --git a/src/handshake/machine.rs b/src/handshake/machine.rs index 83dae1f..cb04144 100644 --- a/src/handshake/machine.rs +++ b/src/handshake/machine.rs @@ -101,6 +101,7 @@ pub enum RoundResult { #[derive(Debug)] pub enum StageResult { /// Reading round finished. + #[allow(missing_docs)] DoneReading { result: Obj, stream: Stream, tail: Vec }, /// Writing round finished. DoneWriting(Stream), diff --git a/src/handshake/mod.rs b/src/handshake/mod.rs index e063d4a..00eeb74 100644 --- a/src/handshake/mod.rs +++ b/src/handshake/mod.rs @@ -4,7 +4,8 @@ pub mod client; pub mod headers; pub mod server; -mod machine; +#[allow(missing_docs)] +pub mod machine; use std::{ error::Error as ErrorTrait, diff --git a/src/handshake/server.rs b/src/handshake/server.rs index 2f095ce..d280ffa 100644 --- a/src/handshake/server.rs +++ b/src/handshake/server.rs @@ -94,7 +94,8 @@ pub fn create_response_with_body( } // Assumes that this is a valid response -fn write_response(mut w: impl io::Write, response: &HttpResponse) -> Result<()> { +#[allow(missing_docs)] +pub fn write_response(mut w: impl io::Write, response: &HttpResponse) -> Result<()> { writeln!( w, "{version:?} {status}\r",