tcp_request/request/
trait.rs

1use crate::*;
2
3/// Trait defining the interface for request operations.
4pub trait RequestTrait: Send + Debug {
5    type RequestResult: Sized;
6
7    /// Sends data through the request.
8    ///
9    /// # Arguments
10    ///
11    /// - `&[u8]` - The data to be sent.
12    ///
13    /// # Returns
14    ///
15    /// - `Self::RequestResult` - The result of the send operation.
16    fn send(&mut self, data: &[u8]) -> Self::RequestResult;
17}