UdpResponseBinary

Type Alias UdpResponseBinary 

Source
pub type UdpResponseBinary = Vec<u8>;
Expand description

A type alias for a binary UDP response.

Aliased Type§

pub struct UdpResponseBinary { /* private fields */ }

Trait Implementations§

Source§

impl ResponseTrait for UdpResponseBinary

Implements the ResponseTrait for UdpResponseBinary.

Source§

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

Creates a UdpResponseBinary instance from a byte slice.

§Arguments
  • &[u8] - The byte slice containing the response data.
§Returns
  • Self - A new UdpResponseBinary instance.
Source§

fn binary(&self) -> Self::OutputBinary

Returns the binary representation of the response.

§Returns
  • Self::OutputBinary - The binary data of the response.
Source§

fn text(&self) -> UdpResponseText

Converts the binary response to a text representation.

§Returns
  • UdpResponseText - The text representation of the response, with invalid UTF-8 sequences replaced.
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.