pub struct TcpResponse {
pub data: String,
pub encoding: String,
pub file_path: Option<PathBuf>,
pub delay_ms: u64,
pub close_after_response: bool,
pub keep_alive: bool,
}Expand description
TCP response configuration
Fields§
§data: StringResponse data (hex string, base64, or plain text)
encoding: StringData encoding: “hex”, “base64”, “text”, “file”
file_path: Option<PathBuf>File path to load response from (if encoding is “file”)
delay_ms: u64Delay before responding (milliseconds)
close_after_response: boolClose connection after sending response
keep_alive: boolKeep connection open for streaming
Trait Implementations§
Source§impl Clone for TcpResponse
impl Clone for TcpResponse
Source§fn clone(&self) -> TcpResponse
fn clone(&self) -> TcpResponse
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TcpResponse
impl Debug for TcpResponse
Source§impl<'de> Deserialize<'de> for TcpResponse
impl<'de> Deserialize<'de> for TcpResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TcpResponse
impl RefUnwindSafe for TcpResponse
impl Send for TcpResponse
impl Sync for TcpResponse
impl Unpin for TcpResponse
impl UnwindSafe for TcpResponse
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more