pub trait ResponseTrait: Send + Debug {
type OutputText: Clone + Sized;
type OutputBinary: Clone + Sized;
// Required methods
fn text(&self) -> Self::OutputText;
fn binary(&self) -> Self::OutputBinary;
fn from(response: &[u8]) -> Self
where Self: Sized;
}
Expand description
Trait defining the interface for response operations.
Required Associated Types§
type OutputText: Clone + Sized
type OutputBinary: Clone + Sized
Required Methods§
Sourcefn text(&self) -> Self::OutputText
fn text(&self) -> Self::OutputText
Sourcefn binary(&self) -> Self::OutputBinary
fn binary(&self) -> Self::OutputBinary
Implementors§
Source§impl ResponseTrait for TcpResponseBinary
ResponseTrait implementation for binary TCP responses.
impl ResponseTrait for TcpResponseBinary
ResponseTrait implementation for binary TCP responses.
type OutputText = String
type OutputBinary = Vec<u8>
Source§impl ResponseTrait for TcpResponseText
ResponseTrait implementation for text TCP responses.
impl ResponseTrait for TcpResponseText
ResponseTrait implementation for text TCP responses.