tcp_request/response/
trait.rs

1use crate::*;
2
3pub trait ResponseTrait: Send + Debug {
4    type OutputText: Clone + Sized;
5    type OutputBinary: Clone + Sized;
6
7    fn text(&self) -> Self::OutputText;
8
9    fn binary(&self) -> Self::OutputBinary;
10
11    fn from(response: &[u8]) -> Self
12    where
13        Self: Sized;
14}