summaryrefslogtreecommitdiff
path: root/crates/utils/tcp_connection
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2025-09-20 16:27:33 +0800
committer魏曹先生 <1992414357@qq.com>2025-09-20 16:27:33 +0800
commit8b7950077b768dab885743d0dfa49b3b5436dace (patch)
tree1737ccd9e63d225fc48c8920abf6136b031f2f88 /crates/utils/tcp_connection
parenta3c6910caa2e94d2c0f94f3524798020b0c8cdf0 (diff)
Make TcpServerTarget Serializable and Generalizable
Diffstat (limited to 'crates/utils/tcp_connection')
-rw-r--r--crates/utils/tcp_connection/src/target.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/utils/tcp_connection/src/target.rs b/crates/utils/tcp_connection/src/target.rs
index 0172d62..a8cb594 100644
--- a/crates/utils/tcp_connection/src/target.rs
+++ b/crates/utils/tcp_connection/src/target.rs
@@ -1,5 +1,6 @@
use crate::handle::{ClientHandle, ServerHandle};
use crate::target_configure::{ClientTargetConfig, ServerTargetConfig};
+use serde::{Deserialize, Serialize};
use std::{
fmt::{Display, Formatter},
marker::PhantomData,
@@ -10,7 +11,7 @@ use tokio::net::lookup_host;
const DEFAULT_PORT: u16 = 8080;
-#[derive(Debug)]
+#[derive(Debug, Serialize, Deserialize)]
pub struct TcpServerTarget<Client, Server>
where
Client: ClientHandle<Server>,