diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-20 06:58:31 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-20 06:58:31 +0800 |
| commit | d1cda84f0d9acf2700e4c2eeafff4dbb63cc51fe (patch) | |
| tree | c8c8faff8f419e4d94fae72757d179492ae58b37 /src/output_protocol.rs | |
| parent | 332ee84b59f33e3a3f1cb109e02a1c0c9fe108cd (diff) | |
feat: implement core capture engine with CLI and output protocols
Diffstat (limited to 'src/output_protocol.rs')
| -rw-r--r-- | src/output_protocol.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/output_protocol.rs b/src/output_protocol.rs index 87e2400..6a25d2c 100644 --- a/src/output_protocol.rs +++ b/src/output_protocol.rs @@ -1,5 +1,6 @@ use std::sync::Arc; +#[cfg(unix)] pub mod ipc; pub mod stderr; pub mod stdout; @@ -7,6 +8,7 @@ pub mod tcp; pub mod udp; pub mod udp_broadcast; +#[cfg(unix)] pub use ipc::*; pub use stderr::*; pub use stdout::*; @@ -26,13 +28,12 @@ pub use udp_broadcast::*; pub trait OutputProtocol { /// Initializes the output channel. /// - /// This method consumes `self`, indicating it should be called once during setup - /// to prepare the output resource (e.g., opening a file, establishing a connection). + /// Prepares the output resource (e.g., opening a file, establishing a connection). /// /// # Returns /// /// A future that resolves when initialization is complete. - fn init(self) -> impl Future<Output = ()> + Send + Sync; + fn init(&self) -> impl Future<Output = ()> + Send + Sync; /// Sends a message string through the output channel. /// |
