Struct ratchet_rs::WebSocketResponse [−][src]
pub struct WebSocketResponse { /* fields omitted */ }
Expand description
A response to send to a client if the connection will not be upgraded.
Implementations
Attempt to construct a new WebSocketResponse
from code
.
Errors
Errors if the status code is invalid.
pub fn with_headers<I>(
code: u16,
headers: I
) -> Result<WebSocketResponse, InvalidStatusCode> where
I: IntoIterator<Item = (HeaderName, HeaderValue)>,
pub fn with_headers<I>(
code: u16,
headers: I
) -> Result<WebSocketResponse, InvalidStatusCode> where
I: IntoIterator<Item = (HeaderName, HeaderValue)>,
Attempt to construct a new WebSocketResponse
from code
and `headers.
Errors
Errors if the status code is invalid.