[][src]Trait hyper::http::message::Protocol

pub trait Protocol {
    fn new_message(
        &self,
        host: &str,
        port: u16,
        scheme: &str
    ) -> Result<Box<dyn HttpMessage>>; }

The trait provides an API for creating new HttpMessages depending on the underlying HTTP protocol.

Required methods

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.

Loading content...

Implementors

impl Protocol for Http11Protocol[src]

Loading content...