pub trait Protocol {
// Required method
fn new_message(
&self,
host: &str,
port: u16,
scheme: &str,
) -> Result<Box<dyn HttpMessage>>;
}
Expand description
The trait provides an API for creating new HttpMessage
s depending on the underlying HTTP
protocol.
Required Methods§
Sourcefn new_message(
&self,
host: &str,
port: u16,
scheme: &str,
) -> Result<Box<dyn HttpMessage>>
fn new_message( &self, host: &str, port: u16, scheme: &str, ) -> Result<Box<dyn HttpMessage>>
Creates a fresh HttpMessage
bound to the given host, based on the given protocol scheme.