tcp_request/response/response_text/
impl.rs

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