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