use crate::*;
impl ResponseTrait for UdpResponseBinary {
type OutputText = UdpResponseText;
type OutputBinary = UdpResponseBinary;
#[inline(always)]
fn from(response: &[u8]) -> Self
where
Self: Sized,
{
response.to_vec()
}
#[inline(always)]
fn binary(&self) -> Self::OutputBinary {
self.clone()
}
#[inline(always)]
fn text(&self) -> UdpResponseText {
let data: String = String::from_utf8_lossy(self).to_string();
data
}
}