RequestTrait

Trait RequestTrait 

Source
pub trait RequestTrait: Send + Debug {
    type RequestResult: Sized;

    // Required method
    fn send(&mut self, data: &[u8]) -> Self::RequestResult;
}
Expand description

A trait for sending UDP requests.

This trait defines the core functionality for sending data over UDP. It requires the Send and Debug traits.

Required Associated Types§

Source

type RequestResult: Sized

The result type for the request operation.

This associated type must be Sized.

Required Methods§

Source

fn send(&mut self, data: &[u8]) -> Self::RequestResult

Sends data through the UDP socket.

§Arguments
  • &[u8] - The data to be sent as a byte slice.
§Returns
  • Self::RequestResult - The result of the send operation, as defined by the implementor.

Implementors§