tcp_request/response/
trait.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
pub trait ResponseTrait {
    type OutputText;
    type OutputBinary;

    fn text(&self) -> Self::OutputText;

    fn binary(&self) -> Self::OutputBinary;

    fn from(response: &[u8]) -> Self
    where
        Self: Sized;

    fn decode(&self) -> Self::OutputBinary;
}