UdpResponseText

Type Alias UdpResponseText 

Source
pub type UdpResponseText = String;
Expand description

A type alias for a text UDP response.

Aliased Type§

pub struct UdpResponseText { /* private fields */ }

Trait Implementations§

Source§

impl ResponseTrait for UdpResponseText

Implements the ResponseTrait for UdpResponseText.

Source§

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

Creates a UdpResponseText from a byte slice.

This method first converts the byte slice to UdpResponseBinary and then to UdpResponseText.

§Arguments
  • &[u8] - The byte slice containing the response data.
§Returns
  • Self::OutputText - The text representation of the response.
Source§

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

Returns the text representation of the response.

§Returns
  • Self::OutputText - The text data of the response.
Source§

fn binary(&self) -> UdpResponseBinary

Converts the text response to its binary representation.

§Returns
  • UdpResponseBinary - The binary representation of the response.
Source§

type OutputText = String

The associated type for the text representation of the response.
Source§

type OutputBinary = Vec<u8>

The associated type for the binary representation of the response.