Struct esp_idf_svc::http::client::EspHttpConnection
source · pub struct EspHttpConnection { /* private fields */ }
Implementations§
source§impl EspHttpConnection
impl EspHttpConnection
pub fn new(configuration: &Configuration) -> Result<Self, EspError>
pub fn status(&self) -> u16
pub fn status_message(&self) -> Option<&str>
pub fn header(&self, name: &str) -> Option<&str>
pub fn initiate_request<'a>( &'a mut self, method: Method, uri: &'a str, headers: &'a [(&'a str, &'a str)], ) -> Result<(), EspError>
pub fn is_request_initiated(&self) -> bool
pub fn initiate_response(&mut self) -> Result<(), EspError>
pub fn is_response_initiated(&self) -> bool
pub fn split(&mut self) -> (&EspHttpConnection, &mut Self)
pub fn read(&mut self, buf: &mut [u8]) -> Result<usize, EspError>
pub fn write(&mut self, buf: &[u8]) -> Result<usize, EspError>
pub fn write_all(&mut self, data: &[u8]) -> Result<(), EspError>
Trait Implementations§
source§impl Connection for EspHttpConnection
impl Connection for EspHttpConnection
type Headers = EspHttpConnection
type Read = EspHttpConnection
type RawConnectionError = EspIOError
type RawConnection = EspHttpConnection
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>
source§impl Drop for EspHttpConnection
impl Drop for EspHttpConnection
source§impl ErrorType for EspHttpConnection
impl ErrorType for EspHttpConnection
§type Error = EspIOError
type Error = EspIOError
Error type of all the IO operations on this type.
source§impl Headers for EspHttpConnection
impl Headers for EspHttpConnection
fn header(&self, name: &str) -> Option<&str>
fn content_type(&self) -> Option<&str>
fn content_len(&self) -> Option<u64>
fn content_encoding(&self) -> Option<&str>
fn transfer_encoding(&self) -> Option<&str>
fn host(&self) -> Option<&str>
fn connection(&self) -> Option<&str>
fn cache_control(&self) -> Option<&str>
fn upgrade(&self) -> Option<&str>
source§impl RawHandle for EspHttpConnection
impl RawHandle for EspHttpConnection
source§impl Read for EspHttpConnection
impl Read for EspHttpConnection
source§fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
fn read(&mut self, buf: &mut [u8]) -> Result<usize, Self::Error>
Read some bytes from this source into the specified buffer, returning how many bytes were read. Read more
source§fn read_exact(
&mut self,
buf: &mut [u8],
) -> Result<(), ReadExactError<Self::Error>>
fn read_exact( &mut self, buf: &mut [u8], ) -> Result<(), ReadExactError<Self::Error>>
Read the exact number of bytes required to fill
buf
. Read moresource§impl Status for EspHttpConnection
impl Status for EspHttpConnection
source§impl Write for EspHttpConnection
impl Write for EspHttpConnection
source§fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
fn write(&mut self, buf: &[u8]) -> Result<usize, Self::Error>
Write a buffer into this writer, returning how many bytes were written. Read more
source§fn flush(&mut self) -> Result<(), Self::Error>
fn flush(&mut self) -> Result<(), Self::Error>
Flush this output stream, blocking until all intermediately buffered contents reach their destination.