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

    // Required methods
    fn split(&mut self) -> (&Self::Headers, &mut Self::Read);
    fn initiate_response<'a>(
        &'a mut self,
        status: u16,
        message: Option<&'a str>,
        headers: &'a [(&'a str, &'a str)]
    ) -> Result<(), Self::Error>;
    fn is_response_initiated(&self) -> bool;
    fn raw_connection(
        &mut self
    ) -> Result<&mut Self::RawConnection, Self::Error>;
}

Required Associated Types§

Required Methods§

source

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

source

fn initiate_response<'a>( &'a mut self, status: u16, message: Option<&'a str>, headers: &'a [(&'a str, &'a str)] ) -> Result<(), Self::Error>

source

fn is_response_initiated(&self) -> bool

source

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

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§

fn split( &mut self ) -> (&<&mut C as Connection>::Headers, &mut <&mut C as Connection>::Read)

source§

fn initiate_response<'a>( &'a mut self, status: u16, message: Option<&'a str>, headers: &'a [(&'a str, &'a str)] ) -> Result<(), <&mut C as ErrorType>::Error>

source§

fn is_response_initiated(&self) -> bool

source§

fn raw_connection( &mut self ) -> Result<&mut <&mut C as Connection>::RawConnection, <&mut C as ErrorType>::Error>

Implementors§