tcp_request/response/response_text/
impl.rs

1use crate::*;
2
3impl ResponseTrait for TcpResponseText {
4    type OutputText = TcpResponseText;
5    type OutputBinary = TcpResponseBinary;
6
7    #[inline]
8    fn from(response: &[u8]) -> Self::OutputText
9    where
10        Self: Sized,
11    {
12        <TcpResponseBinary as ResponseTrait>::from(response).text()
13    }
14
15    #[inline]
16    fn text(&self) -> Self::OutputText {
17        self.clone()
18    }
19
20    #[inline]
21    fn binary(&self) -> TcpResponseBinary {
22        self.clone().into_bytes()
23    }
24}