A Rust library for sending raw TCP requests, with features for handling responses, managing redirects, and working with compressed data over TCP connections.
usecrate::*;/// ResponseTrait implementation for text TCP responses.
implResponseTrait forTcpResponseText{typeOutputText= TcpResponseText;typeOutputBinary= TcpResponseBinary;/// Creates a text response from raw bytes.
////// # Arguments
////// - `&[u8]` - The raw response data.
////// # Returns
////// - `Self::OutputText` - The text response instance.
#[inline(always)]fnfrom(response:&[u8])->Self::OutputText
whereSelf: Sized,
{<TcpResponseBinary as ResponseTrait>::from(response).text()}/// Gets the text representation of the response.
////// # Returns
////// - `Self::OutputText` - The text response data.
#[inline(always)]fntext(&self)->Self::OutputText{self.clone()}/// Converts the text response to binary representation.
////// # Returns
////// - `TcpResponseBinary` - The binary representation of the response.
#[inline(always)]fnbinary(&self)-> TcpResponseBinary{self.clone().into_bytes()}}