modulink_rs/listeners/
mod.rs1pub mod http_listener;
2pub use http_listener::HttpListener;
3
4use async_trait::async_trait;
5
6pub trait BaseListenerSync: Send + Sync {
8 fn start(&self) -> std::io::Result<()>;
10 fn name(&self) -> &'static str;
12}
13
14#[async_trait]
16pub trait BaseListenerAsync: Send + Sync {
17 async fn start(&self) -> std::io::Result<()>;
19 fn name(&self) -> &'static str;
21}
22
23pub use self::BaseListenerSync as ListenerSync;
25pub use self::BaseListenerAsync as ListenerAsync;