pub trait Connection: Status + Headers + Read + Write {
    type Headers: Status + Headers;
    type Read: Read<Error = Self::Error>;
    type RawConnectionError: Error;
    type RawConnection: Read<Error = Self::RawConnectionError> + Write<Error = Self::RawConnectionError>;

    // Required methods
    async fn initiate_request(
        &mut self,
        method: Method,
        uri: &str,
        headers: &[(&str, &str)]
    ) -> Result<(), Self::Error>;
    fn is_request_initiated(&self) -> bool;
    async fn initiate_response(&mut self) -> Result<(), Self::Error>;
    fn is_response_initiated(&self) -> bool;
    fn split(&mut self) -> (&Self::Headers, &mut Self::Read);
    fn raw_connection(
        &mut self
    ) -> Result<&mut Self::RawConnection, Self::Error>;
}

Required Associated Types§

Required Methods§

source

async fn initiate_request( &mut self, method: Method, uri: &str, headers: &[(&str, &str)] ) -> Result<(), Self::Error>

source

fn is_request_initiated(&self) -> bool

source

async fn initiate_response(&mut self) -> Result<(), Self::Error>

source

fn is_response_initiated(&self) -> bool

source

fn split(&mut self) -> (&Self::Headers, &mut Self::Read)

source

fn raw_connection(&mut self) -> Result<&mut Self::RawConnection, Self::Error>

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl<C> Connection for &mut C
where C: Connection,

§

type Headers = <C as Connection>::Headers

§

type Read = <C as Connection>::Read

§

type RawConnectionError = <C as Connection>::RawConnectionError

§

type RawConnection = <C as Connection>::RawConnection

source§

async fn initiate_request( &mut self, method: Method, uri: &str, headers: &[(&str, &str)] ) -> Result<(), Self::Error>

source§

fn is_request_initiated(&self) -> bool

source§

async fn initiate_response(&mut self) -> Result<(), Self::Error>

source§

fn is_response_initiated(&self) -> bool

source§

fn split(&mut self) -> (&Self::Headers, &mut Self::Read)

source§

fn raw_connection(&mut self) -> Result<&mut Self::RawConnection, Self::Error>

Implementors§