esp_idf_svc::http::client

Trait Connection

Source
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, Error = Self::RawConnectionError> + Write;

    // Required methods
    fn initiate_request<'a>(
        &'a mut self,
        method: Method,
        uri: &'a str,
        headers: &'a [(&'a str, &'a str)],
    ) -> Result<(), Self::Error>;
    fn is_request_initiated(&self) -> bool;
    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

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

Source

fn is_request_initiated(&self) -> bool

Source

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>

Implementations on Foreign Types§

Source§

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

Source§

type Headers = <C as Connection>::Headers

Source§

type Read = <C as Connection>::Read

Source§

type RawConnectionError = <C as Connection>::RawConnectionError

Source§

type RawConnection = <C as Connection>::RawConnection

Source§

fn initiate_request<'a>( &'a mut self, method: Method, uri: &'a str, headers: &'a [(&'a str, &'a str)], ) -> Result<(), <&mut C as ErrorType>::Error>

Source§

fn is_request_initiated(&self) -> bool

Source§

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

Source§

fn is_response_initiated(&self) -> bool

Source§

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

Source§

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

Implementors§